Переглянути джерело

fcl-db: tests: MS SQL Server and Sybase do not support dates before 1753 for their DATETIME data type so do not try insert these dates into test tables.
(MS SQL 2008 introduced DATETIME2, which support full range of years 0000-9999).

git-svn-id: trunk@22998 -

lacak 12 роки тому
батько
коміт
4aa8b2cef7
1 змінених файлів з 8 додано та 0 видалено
  1. 8 0
      packages/fcl-db/tests/sqldbtoolsunit.pas

+ 8 - 0
packages/fcl-db/tests/sqldbtoolsunit.pas

@@ -282,6 +282,14 @@ begin
       end;
     end;
 
+  if SQLServerType in [ssMSSQL, ssSybase] then
+    // Some DB's do not support datetime values before 1753-01-01
+    for i := 18 to testValuesCount-1 do
+      begin
+      testValues[ftDate,i] := testValues[ftDate,0];
+      testValues[ftDateTime,i] := testValues[ftDateTime,0];
+      end;
+
   // DecimalSeparator must correspond to monetary locale (lc_monetary) set on PostgreSQL server
   // Here we assume, that locale on client side is same as locale on server
   if SQLServerType in [ssPostgreSQL] then