|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
locking records
could i request some advice?
when a record is locked by one user, and then a new user tries to update the record while it is locked would they receive an error. If they receive an erro whats the best way to handle it. When a record is locked can another user still read it. When an optimistic lock is used on a record, if two users try and update at the same time, what happens? Thanks |
|
#2
|
|||
|
|||
|
Record locking can be pretty tricky. Optimistic locking only locks records when you call the Update method of the ADO Recordset object, and it does so in a row by row fashion. Pessimistic locking is a bit more forceful in that it locks the record when any editions are made. This is row by row as well. Read Only locking indicates that no editions can be made to the record.
Typically, adLockOptimistic is sufficient, because SQL (and Access) are fairly reliable about handling conflicting database updates and synchronization. Be sure you use adUseServer for your cursor type if you want to use Pessimistic locking (better if you think there will be a lot of editting conflicts). |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > locking records |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|