Drew Wutka
DWUTKA at Marlow.com
Tue May 20 15:58:31 CDT 2008
It was in the JET White Paper that Microsoft put out, and I probably mentioned something about it a long time ago. Basically, the 'locks' on the .mdb are actually placed on the .ldb on 'virtual' bits of that file. The .ldb is 64 bytes for every connection to the .mdb. 32 bytes for the user name, 32 bytes for the computer name. With a maximum of 255 users, the most the .ldb will ever physically be is roughly 16k. BUT, when you are locking byte 205,000 of an .mdb, you can 'lock' the 205,000 byte of the .ldb, even though that byte doesn't physically exist on the hard drive, you can still tell the OS that you want that byte locked. Jet puts these locks on the .ldb, so it can write to the .mdb (can't write to a file another user has locked). The white paper had some of the math required to figure out what bits on the .ldb would be locked for the various 'pages' in an .mdb. Honestly, not really worth the effort if you ask me. If you need that much control over the database system, I would go with a server-side db. (this is coming from someone who uses .mdbs A LOT). Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, May 20, 2008 2:22 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Who is locking the record Someone on this list (Drew maybe?) said that the information is stored in WINDOWS lock system. IOW to Windows this is really just a file. JET uses the windows lock system to create locks and uses some part of that lock mechanism to say what pieces of the MDB file is being locked. It is a "place a lock from byte x to byte Y of file z". It is not clear that even Jet knows WHO is locking something, only that something is being locked. OTOH this entire subject is not clear to me. I have never seen it written down that this is the way it actually happens, it was just some list member saying so. I did find this which appears to explain this process: http://www.wotsit.org/download.asp?f=jetlock&sc=264608112 John W. Colby www.ColbyConsulting.com Jennifer Gross wrote: > You are correct. I can see all the users that are logged in, as well as > their computer name, but I am not seeing any other information. Access is > storing it somewhere, wish they would let me at it. > > Jennifer > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Edward S Zuris > Sent: Tuesday, May 20, 2008 11:52 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Who is locking the record > > > You could look in the ldb file, of some versions of Access, using notepad, > and see who is logged into the mdb. > > But I think it won't tell you has what record is claimed by whom. > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jennifer Gross > Sent: Tuesday, May 20, 2008 12:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Who is locking the record? > > > No takers on this? Sometimes the Access message is generic and just lets > you know the record is locked. Other times when a record is locked Access > will display their own message letting the user know who is locking the > record. So it seems that information is available, must be in the LDB file > - does anyone know how to get at it? > > 3218 is a record locking error, perhaps 3188 as well. I can trap the error, > but I don't know how to identify who is locking the record. > > Jennifer > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jennifer Gross > Sent: Friday, May 16, 2008 1:13 PM > To: AccessD List > Subject: [AccessD] Who is locking the record? > > Hi All, > > In a multi-user split database using Access security, using the statement > > Currentdb.Execute SQLUpdateQueryName, dbFailOnError > > When it generates the error 3218 that a record is locked, how can I find out > which user is locking that record? > > Is there a better way to do this? What I want to do is know that the > operation failed and let the user know which other user they need to go to > and ask them to close a screen, or whatever. > > Thanks in advance, > > Jennifer > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.