FireDAC.Comp.Client.TFDUpdateSQL.DeleteSQL
Delphi
property DeleteSQL: TStrings index 2 read GetSQL write SetSQL;
C++
__property System::Classes::TStrings* DeleteSQL = {read=GetSQL, write=SetSQL, index=2};
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp |
FireDAC.Comp.Client | TFDUpdateSQL |
Description
Specifies an SQL statement to use when applying a record deletion.
Set DeleteSQL to an SQL statement to use when applying a record deletion to a database.
To submit a dataset original field value to a command, use the :OLD_<field name>
parameter name. Statements can use additional parameters and macros. To get access to the parameters or macros collection, use the Commands property.
To create a DELETE
statement at design time, use the UpdateSQL editor to create statements. For that, double-click the TFDUpdateSQL component. Also, you can use stored procedure calls or other SQL commands to apply deletions.
See the Commands property for details on how to use macros or additional parameters in the command text.
Example
FDUpdateSQL1.DeleteSQL := 'DELETE FROM ADDEMO."Shippers" WHERE SHIPPERID = :OLD_SHIPPERID';