Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



ADO Recordset Object LockType Property

The type of locks placed on records during editing.

LockType Property Return Values

Sets or returns one of the following LockTypeEnum values:

Constant
Description
adLockReadOnly
Default. Read-only; the data cannot be modified.
adLockPessimistic
Pessimistic locking, record by record. The provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately upon editing.
adLockOptimistic
Optimistic locking, record by record. The provider uses optimistic locking, locking records only when you call the Update method.
adLockBatchOptimistic
Optimistic batch updates. Required for batch update mode as opposed to immediate update mode.

LockType Property Remarks

Set the LockType property before opening a recordset to specify what type of locking the provider should use when opening it. Read the property to return the type of locking in use on an open Recordset object. The LockType property is read/write when the recordset is closed and read-only when it is open.

Providers may not support all lock types. If a provider cannot support the requested LockType setting, it will substitute another type of locking. To determine the actual locking functionality available in a Recordset object, use the ADO Recordset Object Supports Method with adUpdate and adUpdateBatch.

LockType Property Example

See the ADO Recordset Object CursorType Property example.



ContentsPreviousNextIndex