Show: Delphi C++
Display Preferences

FireDAC.Comp.Client.TFDCustomUpdateObject.Apply

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Apply(ARequest: TFDUpdateRequest; var AAction: TFDErrorAction;  AOptions: TFDUpdateRowOptions); virtual; abstract;

C++

virtual void __fastcall Apply(Firedac::Stan::Option::TFDUpdateRequest ARequest, Firedac::Stan::Intf::TFDErrorAction &AAction, Firedac::Stan::Option::TFDUpdateRowOptions AOptions) = 0 ;

Properties

Type Visibility Source Unit Parent
procedure
function
public
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDCustomUpdateObject

Description

Applies the record update request to the database for the current record in the DataSet.

Call Apply to apply changes of the current DataSet record to the database. 

The standard implementation (TFDUpdateSQL) sets parameters for a SQL statement and executes it to update a record. ARequest indicates the update kind, so for TFDUpdateSQL, it specifies which SQL statement to execute. If an appropriate SQL statement is not specified, then FireDAC will generate a default one, as it does when TFDAdaptedDataSet.UpdateObject is not specified. 

Apply is primarily intended for manually executing update statements from an OnUpdateRecord event handler. ARequest, AAction and AOptions argument values must be assigned to the corresponding arguments of the Apply method.   ARequest can have one of the following values:

Value 

Meaning 

TFDUpdateSQL property 

arInsert 

Inserts a record in the database. 

InsertSQL 

arUpdate 

Updates a record in the database. 

ModifySQL 

arDelete 

Deletes a record from the database. 

DeleteSQL 

arLock 

Locks a record in the database. 

LockSQL 

arUnlock 

Releases the record lock in the database. 

UnlockSQL 

arFetchRow 

Fetches a record from the database. 

FetchRowSQL 

arUpdateHBlobs 

Updates Oracle BLOB/CLOB values in the database. 

arFetchGenerators 

Fetches generator values to put into the record. 

AAction returns the Apply method completion status, specifying what action should the calling code take. Normally this status is used by FireDAC code. When Apply method is called from OnUpdateRecord event handler, assign AAction event handler argument to the AAction argument of the Apply method. Otherwise, use eaDefault as initial value. 

AOptions specifies additional options. When Apply method is called from OnUpdateRecord event handler, assign AOptions event handler argument to the AOptions argument of the Apply method. Otherwise, use [] as a value.

See Also

Samples

Personal tools
In Other Languages
Previous Versions
Assistance