FireDAC.Comp.Client.TFDCustomTransaction.RollbackRetaining

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
Unit: FireDAC.Comp.Client
Parent: TFDCustomTransaction

Delphi

procedure RollbackRetaining;

C++

void __fastcall RollbackRetaining();

Description

Cancels all modifications to the data made in the current transaction, without ending the current transaction.

Call RollbackRetaining to cancel all modifications, such as INSERT / UPDATE / DELETE commands, made in the current transaction to the database. FireDAC supports nested transactions, so the current transaction is the one started with the most recent StartTransaction call. If the database does not support nested transactions, like most DBMSs, then FireDAC will emulate nested transactions using savepoints. 

Before calling RollbackRetaining, an application may check the status of the Active property.

If an application calls RollbackRetaining and there is no current transaction, an exception is raised. 

RollbackRetaining will use native functionality on Interbase/Firebird. On other DBMSs, the method will be equal to calls of Rollback, then of StartTransaction.

See Also