can't rollback

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Guest

can't rollback

Post by Guest » Thu 31 Mar 2005 07:24

Anyone can tell me what is the problem of my coding? I want to update 2 query using transaction function. it still dosn't work, even I used 1 insert query. I set all query with FetchAll = True, the version is 3.50.0.17 with Delphi 7


myConn.StartTransaction;
try

while not table1.Eof do
begin
Query1.execute; (insert into ...)
Query2.Execute; (update into ...)
table1.Next;
end;

myConn.Commit;
except
myConn.Rollback;
end;

thank you

Guest

Post by Guest » Fri 01 Apr 2005 02:07

sorry, I solved the problem. the component is work.
thanks

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 01 Apr 2005 06:09

Is it possible that you use incorrect type of the table? It must be InnoDB.

Post Reply