MS Access Lock file

Deon Olivier 101 Reputation points

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:

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

How can I retrieve the user name?


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.
837 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Golrang 1 Reputation point

    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

    Get contents of laccdb file through VBA

    0 comments No comments

  2. Deon Olivier 101 Reputation points

    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?


    0 comments No comments