Rollback Transaction

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
marcos_donni
Posts: 1
Joined: Sun 01 Jan 2006 03:19

Rollback Transaction

Post by marcos_donni » Sun 01 Jan 2006 03:32

I have a problem when I attempt rollback transaction using tMyTable, follows code in delphi:


con.StartTransaction;
try

qConsulta.First;

while not qConsulta.Eof do begin
//My commands
end;
con.commit

except
con.rollback
end;


Well, if I call rollback thought a button, it works perfect, but if I close form it commit transaction...When I use tMycommand work perfect like code bellow:

cmd.AutoCommit:=False;
cmd.SQL.Text:='start transaction';
cmd.Execute();

Did you note that I setup explicit autocommit:=false?? How can I do it using tMytable??

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

Post by Ikar » Tue 03 Jan 2006 14:32

We couldn't reproduce the problem.
Please send us (mydac*crlab*com) a complete small sample to demonstrate it and include script to create and fill table.

Also supply us following information

- Exact version of Delphi, C++ Builder or Kylix
- Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor
- Exact version of MySQL server and MySQL client.
You can see it in Info sheet of TMyConnection Editor

Post Reply