瀏覽代碼

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 13 年之前
父節點
當前提交
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;
     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
   // 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
   // Here we assume, that locale on client side is same as locale on server
   if SQLServerType in [ssPostgreSQL] then
   if SQLServerType in [ssPostgreSQL] then