EPUB | CHM | PDF

TMySQLUpdateSQL.RefreshRecordSQL

Top Previous Next

Specifies an SQL statement to use to refresh a single record.

Syntax:

property RefreshRecordSQL: TStrings;

Description:

Set RefreshRecordSQL to an SQL statement to use when refresh a single record from a database. Statements can be parameterized queries. To create a statement at design time, use the RefreshRecordSQL editor to create statements, such as:

SELECT o.OrderNo, o.CustNo, c.Company FROM orders o
LEFT JOIN dbdemos.customer c ON o.CustNo = c.CustNo
WHERE o.CustNo = :OLD_CustNo and OrderNo = :OLD_OrderNo

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

note As the example illustrates, RefreshRecordSQL 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.