Bde.DBTables.TUpdateSQL.ModifySQL
Delphi
property ModifySQL: TStrings index 0 read GetSQLIndex write SetSQLIndex;
C++
__property System::Classes::TStrings* ModifySQL = {read=GetSQLIndex, write=SetSQLIndex, index=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Bde.DBTables.pas Bde.DBTables.hpp |
Bde.DBTables | TUpdateSQL |
Description
Specifies the SQL UPDATE statement to use when applying an update to a record and cached updates is enabled.
Set ModifySQL to the SQL UPDATE statement to use when applying an updated record to a dataset. Statements can be parameterized queries. To create a UPDATE statement at design time, use the UpdateSQL editor to create statements, such as:
UPDATE "Country.db" SET Name = :Name, Capital = :Capital, Continent = :Continent WHERE Name = :OLD_Name
At run time, an application can write a statement directly to this property to set or change the UPDATE statement.
Note: As the example illustrates, ModifySQL 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.