FireDAC.Comp.Client.TFDUpdateSQL.Apply
Delphi
procedure Apply(ARequest: TFDUpdateRequest; var AAction: TFDErrorAction;
AOptions: TFDUpdateRowOptions); override;
C++
virtual void __fastcall Apply(Firedac::Stan::Option::TFDUpdateRequest ARequest, Firedac::Stan::Intf::TFDErrorAction &AAction, Firedac::Stan::Option::TFDUpdateRowOptions AOptions);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp |
FireDAC.Comp.Client | TFDUpdateSQL |
Description
Applies a record update request to the DB for the current record in DataSet.
Call Apply to apply the changes of the current DataSet record to the database.
The standard implementation for TFDUpdateSQL sets the parameters for an SQL statement and executes it to update a record. ARequest
indicates the update kind, and for TFDUpdateSQL it specifies which SQL statement to execute. If the appropriate SQL statement is not specified, then FireDAC will generate a default one, as it is doing when TFDAdaptedDataSet.UpdateObject is not specified.
Apply is primarily intended to manually execute the update statements from an OnUpdateRecord event handler.
The ARequest
, AAction
, and AOptions
argument values of the event handler must be assigned to the corresponding arguments of the Apply method.
ARequest
can be one of the following values:
Value |
Meaning |
TFDUpdateSQL SQL property |
---|---|---|
|
Inserts a record to the database. |
InsertSQL |
|
Update a record in the database. |
ModifySQL |
|
Delete a record from the database. |
DeleteSQL |
|
Locks a record in the database. |
LockSQL |
|
Releases a record lock in the database. |
UnlockSQL |
|
Refetches a record from the database. |
FetchRowSQL |
|
Updates Oracle BLOB/CLOB values in the database. |
- |
|
Fetches the generator values to include in the record. |
- |
AAction
returns the completion status of the Apply method, specifying what action should take the calling code. Normally, this status is used by FireDAC code. When the Apply method is called from the OnUpdateRecord event handler, then assign the AAction
argument of the event handler to the AAction
argument of the Apply method. Otherwise, use eaDefault
as the initial value.
AOptions
specifies additional options. When the Apply method is called from the OnUpdateRecord event handler, then assign the AOptions
argument of the event handler to the AOptions
argument of the Apply method. Otherwise, use []
as a value.