LockType - property of the AdoRecordset object
Description:
Returns or sets a value that specifies the type of locking when editing a record in the
AdoRecordset object.
The property returns or sets the
LockTypeEnum value that specifies the type of locking when editing a record in the
AdoRecordset object. This property is for reading/writing on a closed
AdoRecordset object and read only on an open
AdoRecordset object.
Values:
-1 -
adLockUnspecified Unspecified type of lock. Clones inherits lock type from the original
AdoRecordset object.
1 - adLockReadOnly (Default) Read-only records.
2 - adLockPessimistic Pessimistic locking, record by record. The provider lock records immediately after editing.
3 - adLockOptimistic Optimistic locking, record by record. The provider lock records only when calling update.
4 - adLockBatchOptimistic Optimistic batch updates. Required for batch update mode.
Note:
Property access for read and write.
Example:
JavaScriptVBScriptSelect and copy to clipboard
oRs.LockType = 4;
oRs.LockType = 4