Data.DBXCommon.TDBXConnection.RollbackIncompleteFreeAndNil

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure RollbackIncompleteFreeAndNil(var Transaction: TDBXTransaction); virtual;

C++

virtual void __fastcall RollbackIncompleteFreeAndNil(TDBXTransaction* &Transaction);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.DBXCommon.pas
Data.DBXCommon.hpp
Data.DBXCommon TDBXConnection

Description

Rollbacks a transaction without throwing an exception for invalid 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.

See Also