Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading User info from Access LDB file with API Calls 1

Status
Not open for further replies.

stburkeuk

MIS
Mar 23, 2004
27
0
0
GB
I understand that is is possible to use api calls to read the lbd file for access databases to identify who and which computers have the database open,

Can anyone provide me with the starting point on how to retrieve this info.

Thanks

 
MSDN:
For each person who opens a shared database, the Jet database engine writes an entry in the .ldb file of the database. The size of each .ldb 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 Jet database engine supports is 255; therefore, the .ldb file size is never larger than 16 kilobytes.

When a user closes a shared database, the user's entry is not removed from the .ldb file. However, the user's entry may be overwritten when another user opens the database. This means that you cannot use the .ldb file alone to determine who is currently using the database.

Alas...
 
ArkM,

Thanks, that was the information that I could find - after being told that it was possible.
However the previous responce contains a link to the relevent MSDN site.

There is a DLL "Msldbusr.dll contains functions that enable you to do the following:
View all computers that have logged into a database since the .ldb file was created.
View only computers that are currently logged into a database.
View computers that are causing a database file to be corrupted.
View the count of computers logged into a database.
.

Unfortunately for me this only returns the Computer ID and not the users network ID so unless the database used Userlevel security Ill I have is the Computer.

The solution I have found is to log the users as the open the database in a table with Network username from the environ variable and the ComputerID.

Over time I am building up a list of id's that can be used to identify who is on what computer etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top