Page 1 of 1

can't rollback

Posted: Thu 31 Mar 2005 07:24
by Guest
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

Posted: Fri 01 Apr 2005 02:07
by Guest
sorry, I solved the problem. the component is work.
thanks

Posted: Fri 01 Apr 2005 06:09
by Ikar
Is it possible that you use incorrect type of the table? It must be InnoDB.