Problem with BeginTransaction and StartTransaction
Posted: Mon 21 Nov 2011 16:14
I am having a problem with BeginTransaction:
Using:
SQLConn1: TSQLConnection;
SQLConn2: TSQLConnection;
qu1 :TSQLQuery;
qu2 :TSQLQuery;
qu1 is linked to SQLConn1 and
qu2 is linked to SQLConn2
String Connection:
hostname : 127.0.0.1:3308
database: test
user_name: root
password: 1
//------------ The code is simplified only to test
This is on Delphi 2010 (DBX4) with driver from Borland:
SQLConn1.BeginTransaction;
qu1.SQL.Text := 'show variables like ''autocommit'';';
qu1.Open;
ShowMessage(qu1.Fields[1].AsString);
qu1.Close;
==> Shows 'OFF' ==> works OK
//------------
This is on Delphi 2010 (DBX4) with driver from Devart (5.0.1):
SQLConn2.BeginTransaction;
qu2.SQL.Text := 'show variables like ''autocommit'';';
qu2.Open;
ShowMessage(qu2.Fields[1].AsString);
qu2.Close;
==> Shows 'ON' ==> Must be 'OFF'. What Happened ???
So I can't continue with rollbacks...
//------------
Tests whith MySQL Community 5.1.42 and 5.5.18
Roberto
Using:
SQLConn1: TSQLConnection;
SQLConn2: TSQLConnection;
qu1 :TSQLQuery;
qu2 :TSQLQuery;
qu1 is linked to SQLConn1 and
qu2 is linked to SQLConn2
String Connection:
hostname : 127.0.0.1:3308
database: test
user_name: root
password: 1
//------------ The code is simplified only to test
This is on Delphi 2010 (DBX4) with driver from Borland:
SQLConn1.BeginTransaction;
qu1.SQL.Text := 'show variables like ''autocommit'';';
qu1.Open;
ShowMessage(qu1.Fields[1].AsString);
qu1.Close;
==> Shows 'OFF' ==> works OK
//------------
This is on Delphi 2010 (DBX4) with driver from Devart (5.0.1):
SQLConn2.BeginTransaction;
qu2.SQL.Text := 'show variables like ''autocommit'';';
qu2.Open;
ShowMessage(qu2.Fields[1].AsString);
qu2.Close;
==> Shows 'ON' ==> Must be 'OFF'. What Happened ???
So I can't continue with rollbacks...
//------------
Tests whith MySQL Community 5.1.42 and 5.5.18
Roberto