AnyDAC
ContentsIndexHome
PreviousUpNext
TADUpdateSQL.DeleteSQL Property

Specifies a SQL statement to use when applying a deletion of a record.

Group
Links

Set DeleteSQL to a SQL statement to use when applying a record deletion to a database. 

To submit to a command a dataset original field value, use the :OLD_<field name> parameter name. Statements can use additional parameters and macros. To get access to the parameters or macros collection use Commands property. 

To create a DELETE statement at design time, use the UpdateSQL editor to create statements. For that double click on TADUpdateSQL component. Also, you can use stored procedure call or other SQL command to apply deletion. 

See the Commands property for details of how to use macros or additional parameters in the command text.

property DeleteSQL: TStrings;
ADUpdateSQL1.DeleteSQL := 'DELETE FROM ADDEMO."Shippers" WHERE SHIPPERID = :OLD_SHIPPERID';
What do you think about this topic? Send feedback!