RS.Open SQL, CONN, A, B
A:
AdopenForwardonly (= 0)
Read only, and the current data record can only move down
AdopenKeyset (= 1)
Read-only, current data records are free to move
AdoPendynamic (= 2)
Ready-write, current data records are free to move
AdoPenStatic (= 3)
Readable, current data records are free to move, you can see new records
B:
AdlockReadOnly (= 1)
Default lock type, record set is read-only, can not modify record
AdlockPESSIMISTIC (= 2)
Pessimistic locking, when modified records, data providers will try to lock records to ensure successful editing records. As long as the editing start, lock the record immediately.
AdlockOptimistic (= 3)
Optimistic lock until you lock the record when you submit an update record with an UPDATE method.
AdlockBatchOptimistic (= 4)
Batch optimism locks, allowing multiple records to be modified, only lock the record only after calling the UpdateBatch method.
When you don't need to change any record, you should use a read-only recordset, so provider doesn't have to do anything.
For general use, optimistic locks may be the best choice, because records are only locked for a short period of time.
Data is updated during this time. This reduces the use of resources.