I am just bugfixing in an app that uses IBDAC to access firebird 2.5.
The app starts with
Code: Select all
Database : TIBCConnection;
begin
Database.AutoCommit:=False;
Database.Open;
Database.StartTransaction;
...
// From time to time - typically after relevant database actions - the app calls
Database.CommitRetaining;
Now I have an error case where CommitRetaining is called but a bit later an error occurs where I'd need to remove the changes that have been made in the database. The flow of events is as follows:
Code: Select all
Here the "wrapping transaction" should start
try
Some Object writes to the database
and (unfortunately) calls CommitRetaining
Here an error occurs. As a result the changes in the database should be discarded
except
Here I'd like to rollback the "wrapping transaction"
end;
Thanks,
Ralf