can't rollback

can't rollback

Postby 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
 

Postby Guest » Fri 01 Apr 2005 02:07

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

Postby Ikar » Fri 01 Apr 2005 06:09

Is it possible that you use incorrect type of the table? It must be InnoDB.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components