FireDAC.Comp.Client.TFDUpdateSQL.LockSQL
Delphi
property LockSQL: TStrings index 3 read GetSQL write SetSQL;
C++
__property System::Classes::TStrings* LockSQL = {read=GetSQL, write=SetSQL, index=3};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp |
FireDAC.Comp.Client | TFDUpdateSQL |
Description
Specifies the SQL statement to use when locking a record.
Set LockSQL to the SQL statement to use when locking a single record in a database. The library uses the statement if UpdateOptions.LockMode is pessimistic or optimistic.
To submit a dataset original field value to a command, use the :OLD_<field name>
parameter name. Statements can use additional parameters and macros. To get access to the parameters or macros collection, use the Commands property.
To create a SELECT ... FOR UPDATE
statement at design time, use the UpdateSQL editor. For that, double-click the TFDUpdateSQL component. Also, you can use stored procedure calls or other SQL commands to lock records.
See the Commands property for details on how to use macros or additional parameters in the command text.