MyCommand rollback question
Posted: Tue 04 Dec 2007 23:13
I use Mydac Trial version and delphi 7.
My tables are innoDB.
In my code, I'm trying to use transactions, but it does not work properly:
when I rollback a transaction, it does nothing.
MyCommand.AutoCommit := False;
Try
MyConnection.StartTransaction;
MyCommand.Execute;
except
MyConnection.Rollback; <-- not work?
Exit;
end;
I try to set autocommit = 0 with a TMyCommand component, but when I interrogate the TMyServerControl component, autocommit is always set to true.
My tables are innoDB.
In my code, I'm trying to use transactions, but it does not work properly:
when I rollback a transaction, it does nothing.
MyCommand.AutoCommit := False;
Try
MyConnection.StartTransaction;
MyCommand.Execute;
except
MyConnection.Rollback; <-- not work?
Exit;
end;
I try to set autocommit = 0 with a TMyCommand component, but when I interrogate the TMyServerControl component, autocommit is always set to true.