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