Browse Source

* Commit the DDL-transaction in the TestScript test. (interbase only)

git-svn-id: trunk@10839 -
joost 17 years ago
parent
commit
08a7e289cf
1 changed files with 5 additions and 0 deletions
  1. 5 0
      packages/fcl-db/tests/testfieldtypes.pas

+ 5 - 0
packages/fcl-db/tests/testfieldtypes.pas

@@ -164,10 +164,15 @@ begin
       script.append('create table a (id int);');
       script.append('create table a (id int);');
       script.append('create table b (id int);');
       script.append('create table b (id int);');
       ExecuteScript;
       ExecuteScript;
+      // Firebird/Interbase need a commit after a DDL statement. Not necessary for the other connections
+      if SQLDbType=interbase then TSQLDBConnector(DBConnector).Transaction.CommitRetaining;
+
       end;
       end;
   finally
   finally
     TSQLDBConnector(DBConnector).Connection.ExecuteDirect('drop table a');
     TSQLDBConnector(DBConnector).Connection.ExecuteDirect('drop table a');
     TSQLDBConnector(DBConnector).Connection.ExecuteDirect('drop table b');
     TSQLDBConnector(DBConnector).Connection.ExecuteDirect('drop table b');
+    // Firebird/Interbase need a commit after a DDL statement. Not necessary for the other connections
+    if SQLDbType=interbase then TSQLDBConnector(DBConnector).Transaction.CommitRetaining;
   end;
   end;
 end;
 end;