RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBXConnection.RollbackIncompleteFreeAndNil Method

Rollbacks a transaction without throwing an exception for invalid transaction.

Pascal
procedure RollbackIncompleteFreeAndNil(var Transaction: TDBXTransaction); virtual;
C++
virtual __fastcall RollbackIncompleteFreeAndNil(TDBXTransaction Transaction);

This method rolls back the work for the TDBXTransaction. Any active transactions that were begun after this transaction are freed and effectively rolled back as well. The variable Transaction instance is set to nil

Unlike the RollbackFreeAndNil procedure, this procedure does not throw an exception if Transaction is invalid or set to nil. This method is ideally used in a finally (or except) block. The try block uses either CommitFreeAndNil or RollbackFreeAndNil, and the Transaction has already been completed, freed, and set to nil. If an exception is not raised in the try block, a call to RollbackIncompleteFreeAndNil in the finally block does nothing, because the Transaction instance is no longer valid. If an exception is raised, a call to RollbackIncompleteFreeAndNil in the finally block rolls back, frees, and sets the Transaction instance to nil

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!