'Optimistic record locking' - what is it? (1 Viewer)

Carl_R

Registered User.
Local time
Today, 06:46
Joined
Aug 16, 2002
Messages
82
What is 'Optimistic record locking'?

Can't find anything in the access97 help (even though it is referenced in an error).

Can someone explain what it is, and how to control it (ie. can it be turned on/off)?

Thanks
 

Mile-O

Back once again...
Local time
Today, 05:46
Joined
Dec 10, 2002
Messages
11,316
Optimistic locking: Where Access only tries to lock a record when someone tries to save any changes that they have made.

Optimistic locking implies that, when a user edits a record, Access optimistically assumes that noone else will want to edit the same record, and so it doesn't lock it.

Pessimistic locking: When Access locks a record whenever someone starts to change the contents of that record.

Pessimistic locking implies that, when a user edits a record, Access pessimistically assumes that someone else will want to edit the same record and so needs to lock it.
 

Carl_R

Registered User.
Local time
Today, 06:46
Joined
Aug 16, 2002
Messages
82
Thanks for the reply :)

Is there a chance that with Optimistic locking, two users updating the same object can cause DB corruption?

Oh, and how does one turn off Optimistic locking? Can't seem to find anything in Access97 with any reference to this.
 

Mile-O

Back once again...
Local time
Today, 05:46
Joined
Dec 10, 2002
Messages
11,316
I found help in MS Access '97 without any problem.

Help -> Contents and Index -> Index tab -> Optimistic locking
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:46
Joined
Feb 28, 2001
Messages
27,189
There is always a chance that a single user on a stand-alone machine can cause database corruption. (Access IS, after all, a Microsoft product...)

The issues of corruption would occur with greater frequency if you have users sharing the database but don't have it set up with workgroups and normal file locking.

Corruption would also occur if the users had the wrong access rights on the directory in which the shared copy of Access resided. They have to be able to lock and unlock things.

To do it right, users must be able to create and delete files as well as read and write to them. (Specifically, the xxx.LDB file where xxx.MDB is your database file.) If the users cannot create the .LDB file then corruption becomes a significant possibility.
 

Users who are viewing this thread

Top Bottom