FireDAC.Comp.Client.TFDCustomUpdateObject.Apply
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 ;
Contents
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 |
---|---|---|
|
Inserts a record in the database. |
InsertSQL |
|
Updates a record in the database. |
ModifySQL |
|
Deletes a record from the database. |
DeleteSQL |
|
Locks a record in the database. |
LockSQL |
|
Releases the record lock in the database. |
UnlockSQL |
|
Fetches a record from the database. |
FetchRowSQL |
|
Updates Oracle BLOB/CLOB values in the database. |
- |
|
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
- Overriding Posting Updates
- FireDAC.Comp.Client.TFDUpdateSQL
- FireDAC.Comp.Client.TFDAdaptedDataSet.UpdateObject