Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to: Access 2013, Office 2013
Indicates the type of locks placed on records during editing.
Settings and return values
Sets or returns a LockTypeEnum value. The default value is adLockReadOnly.
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.
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 Supports method with adUpdate and adUpdateBatch.
The adLockPessimistic setting is not supported if the CursorLocation property is set to adUseClient. If an unsupported value is set, then no error will result; the closest supported LockType will be used instead.
The LockType property is read/write when the Recordset is closed and read-only when it is open.
Remote Data Service UsageWhen used on a client-side Recordset object, the LockType property can only be set to adLockBatchOptimistic.