Icon LockProtocol Property

property LockProtocol: TLockProtocol

Usage

Use the LockProtocol property to specify whether the session will use a pessimistic or optimistic locking model when editing records via navigational or SQL methods. The pessimistic locking model dictates that records should be locked when the record is retrieved for editing, which is during the Edit method of a TDBISAMTable or TDBISAMQuery component and during the execution of an SQL UPDATE statement. The optimistic locking model dictates that records should be locked when the record modifications are posted to the database table, which is during the Post method of a TDBISAMTable or TDBISAMQuery component and during the execution of an SQL UPDATE statement. Using an optimistic locking model for remote connections to a database server removes the possibility that dangling record locks will be left on the server if a client application is terminated unexpectedly.

The default value is lpPessimistic.
Image