Unit 'SQLDB' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TSQLQuery.Options

Options controlling the behaviour of the dataset.

Declaration

Source position: sqldb.pp line 722

published property TSQLQuery.Options : TSQLQueryOptions;

Description

Options controls the behaviour of the dataset. The following options can be specified:

sqoKeepOpenOnCommit
The default SQLDB behaviour is to close all datasets connected to a transaction when a transaction is committed or rolled back, which means that transactions must remain active as long as the dataset is open. This can create problems with locking of records etc. With this option set, the dataset will be kept open. Note that setting this option will cause SQLDB to fetch all records in the result set in memory.
sqoAutoApplyUpdates
Setting this option will make TSQLQuery call ApplyUpdates after every Post or Delete operation.
sqoAutoCommit
Setting this option will make TSQLQuery call commit after every ApplyUpdates
sqoCancelUpdatesOnRefresh
Setting this option will cause TSQLQuery to abandon all pending changes when Refresh is called. The default behaviour is to raise an exception when Refresh is called and there are pending changes
sqoPreferRefresh
If the database engine supports RETURNING, then the returning mechanism is used to fetch field values after an update of the database. Setting this option will disable the use of RETURNING and will fetch updated or new values instead with the TSQLQuery.RefreshSQL property or a constructed refresh SQL statement.

See also

TCustomSQLQuery.ApplyUpdates

  

Apply updates and check result.

TCustomSQLQuery.Post

  

Post pending changes and optionally apply updates.

TCustomSQLQuery.Delete

  

Delete and optionally apply updates.


Documentation generated on: Nov 23 2024