MS Access Lock file

Deon Olivier 101 Reputation points
2021-11-20T08:12:44.633+00:00

Good day,
Is it possible to see who the user is that is currently in a MS Access database by viewing the lock file (Laccdb file).
The lock file looks like below:
151192-capture.jpg

This only shows the computer name, and not the username. I need to know the user name.

How can I retrieve the user name?

Thanks
Deon

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
729 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Golrang Industrial Group 1 Reputation point
    2021-11-20T13:07:52.787+00:00

    Hi as far as I know
    for each person who opens a shared database, the Access database engine writes an entry in the ".laccdb" or ".ldb" file of the database. The size of each entry is 64 bytes. The first 32 bytes contain the computer name (such as JohnDoe). The second 32 bytes contain the security name (such as Admin). The maximum number of concurrent users that the Access database engine supports is 255. Therefore, the lock file size is never larger than 16 kilobytes.

    Rather than reading and parsing the .ldb/.lacdb file, a better approach would be to use the "User Roster" feature of the Access OLEDB provider as described in the Knowledge Base article

    https://support.microsoft.com/en-us/kb/285822

    Get contents of laccdb file through VBA

    No comments

  2. Deon Olivier 101 Reputation points
    2021-11-21T13:47:26.14+00:00

    Hi Golrang,
    This is working fine, but it is still not what I am looking for.
    This code a;so just displays the computer name, and not the user name. Can this code be altered or modified so that it shows the user name?

    Maybe there are some sample codes that I can check out?

    Thanks
    Deon

    No comments