Detailed explanation of RS.Open Str, CONN, #, and # in ASP!
RS.Open SQL, CONN, A, B
A:
AdopenForwardOnly (= 0) read-only, and current data records can only move down
AdoPenKeySet (= 1) read-only, current data records are free to move
AdoPendynamic (= 2) readable and written, current data records are free to move
AdoPenStatic (= 3) readable and written, the current data record is 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 Lock, when modified, the data provider will try to lock the record to ensure successful editing record. As long as the editing start, lock the record immediately.
AdlockOptimistic (= 3) Optimistic lock until the record is locked when you submit an update record with an UPDATE method.
Adlockbatchoptimistic (= 4) Batch optimism locks, allowing multiple records to be modified, only to 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, and data is updated during this time. This reduces the use of resources.