Browse Source

fcl-db: dbtestframework
* refine r26950: only use SET ANSI_NULL_DFLT_ON ON for MS SQL Server; Sybase ASE does not support it.

git-svn-id: trunk@27019 -

reiniero 11 years ago
parent
commit
7f93de8697
1 changed files with 7 additions and 4 deletions
  1. 7 4
      packages/fcl-db/tests/sqldbtoolsunit.pas

+ 7 - 4
packages/fcl-db/tests/sqldbtoolsunit.pas

@@ -235,10 +235,13 @@ begin
       TempTrans.StartTransaction;
       TempTrans.StartTransaction;
       // Proper blob support:
       // Proper blob support:
       FConnection.ExecuteDirect('SET TEXTSIZE 2147483647');
       FConnection.ExecuteDirect('SET TEXTSIZE 2147483647');
-      // When running CREATE TABLE statements, allow NULLs by default - without
-      // having to specify NULL all the time:
-      // http://msdn.microsoft.com/en-us/library/ms174979.aspx
-      FConnection.ExecuteDirect('SET ANSI_NULL_DFLT_ON ON');
+      if SQLServerType=ssMSSQL then
+      begin
+        // When running CREATE TABLE statements, allow NULLs by default - without
+        // having to specify NULL all the time:
+        // http://msdn.microsoft.com/en-us/library/ms174979.aspx
+        FConnection.ExecuteDirect('SET ANSI_NULL_DFLT_ON ON');
+      end;
       TempTrans.Commit;
       TempTrans.Commit;
       TempTrans.Free;
       TempTrans.Free;
       FConnection.Transaction:=nil;
       FConnection.Transaction:=nil;