[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sqldb' (#fcl)

TSQLQuery.RefreshSQL

Refresh query to re-fetch field values after a DB update

Declaration

Source position: sqldb.pp line 620

published property TSQLQuery.RefreshSQL : TStringList;

Description

RefreshSQL can be used to specify a SQL statement that is executed after an UPDATE or INSERT operation. The query will be executed, and the values of all fields in the result set will be copied to the dataset. This SQL statement is only executed during the ApplyUpdates operation, not during the Post call itself.

A RefreshSQL can be constructed automatically by SQLDB by setting the pfRefreshOnUpdate or pfRefreshOnInsert flags in the ProviderFlags of the fields in the dataset, depending on whether the operation was an update or insert.

For SQL engines that support RETURNING clauses, the RETURNING clause will be used to refresh field values, unless sqoPreferRefresh is specified in TSQLQuery.Options

See also

TField.Providerflags

TSQLQuery.Options

  

Options controlling the behaviour of the dataset


Documentation generated on: Nov 14 2015