RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TUpdateSQL.DeleteSQL Property

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

Pascal
property DeleteSQL: TStrings;
C++
__property TStrings DeleteSQL;

Set DeleteSQL to the SQL DELETE statement to use when applying a deletion to a record. Statements can be parameterized queries. To create a DELETE statement at design time, use the UpdateSQL editor to create statements, such as:

DELETE FROM "Country.db"
WHERE Name = :OLD_Name

At run time, an application can write a statement directly to this property to set or change the DELETE statement.

Note: As the example illustrates, DeleteSQL supports an extension to normal parameter binding. To retrieve the value of a field as it exists prior to application of cached updates, the field name with 'OLD_'. This is especially useful when doing field comparisons in the WHERE clause of the statement.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!