RecordLocks=2 (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 07:10
Joined
Sep 21, 2011
Messages
14,287
Hi all,


Curiousity question here.


I have seen a poster in another forum querying why they are unable to 'open a table' when a form is open.

https://www.mrexcel.com/forum/microsoft-access/1057368-can-t-open-table-while-editing.html


They have the form set at RecordLocks=2

Now another poster has taken that to be a page of records as in a datasheet/continous form?


I had taken a page of records to be whatever is in the block of data being read, so records are not really related, just happen to be in the same block on the disk.?


Am I mistaken in this idea?
 

Ranman256

Well-known member
Local time
Today, 02:10
Joined
Apr 9, 2015
Messages
4,337
If you have a split database, then some can edit and you can open the table.
 

Gasman

Enthusiastic Amateur
Local time
Today, 07:10
Joined
Sep 21, 2011
Messages
14,287
If you have a split database, then some can edit and you can open the table.


Hi Ranman256,
I'm more curious as to the locking area.
When I used to work for Honeywell Bull on mainframes, we had somethhing called a Control Interval and a Control Area. A number of CIs were stored in a CA.
When you read a record you could lock out the 'page' which effectively was a CI. The size of the CI depended on how the file would be used as if it was too small, it would split regularly. You could never lock out a single record.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:10
Joined
Feb 28, 2001
Messages
27,179
Access does something like this but not with explicit locking of disk buffers. It happens behind the scenes if it happens at all. You don't get to see the buffering structure.

It is, however, possible to observe the effect you describe. I checked, and setting the locking equal to 2 is choosing dbPessimistic for whatever locking occurs. Using dbOptimistic still allows for locking but the locks have a MUCH shorter duration. Essentially, dbPessimistic has a longer open window of opportunity for lock collisions. It is only recommended for extreme cases such as intentionally locking others out for editing purposes - and to be honest, I don't recall it EVER being recommended for native Access back-ends. But I have seen other vendors who sometimes suggest it, probably due to a different interpretation of what it is that they are locking.
 

Users who are viewing this thread

Top Bottom