Security - List of current users

DeborahP

Registered User.
Local time
Today, 19:03
Joined
Jul 24, 2002
Messages
42
Is there a way to tell who is currently logged into the database? I have activated the Access Security and generated all the accounts. I want to find out who is using the database. I know that the network can tell me through the network end but is there a way in access?

Deborah
 
You have (if any users are logged in) a file called (*.ldb) . You can open it with the notepad. Just one problem...
It gives you the name of every one who has connected since the first one did (Even if they got disconnected since then).
Newman
 
Because of delays in posting changes to .LDB files, it is possible that you might not be able to find all users of the database without writing some code.

The way that I do this is through a startup form.

I created an "Audit" table that tracks users who enter or leave the database through my startup form.

The event routines give me the hooks I need to do this. What I do is make a time-stamped entry of the username during the startup form's Form_Load event. When I close the startup form, I don't actually close it. Instead, I minimize it and make it invisible. But I let it sit there, dormant, inside the user's instance of the application. Then, when someone tries to leave the database, there is an automatic Form_Close event. In THAT routine, I make another entry to the audit table.

This gives me an "In Time" and an "Out Time." As long as no system or network crash occurs, these numbers balance each other by appearing in pairs. After a crash, I might have some cleanups to do.

To find out who is in the database, all I have to do is scan for the startup form Open and Close audit logs and pair them up. If they don't pair up correctly, that person might still be in the database.
 

Users who are viewing this thread

Back
Top Bottom