Patrick O'Dea
asked on
Who is logged into my access database now?
...Christmas eve .... Dublin 08:54
Is there any way of seeing who is currently logged into my database?
What about an audit of who/when people logged in over the last month etc.
Is there any way of seeing who is currently logged into my database?
What about an audit of who/when people logged in over the last month etc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<<When multiple users log into access there is a lockfile created in the same director as the access application file. This lock file lists the users who are logged in.>>
That's not quite right. While in most cases it is true, the .LDB file can contain "phantom users" who although listed, are not currently connected to a database. To actually determine if a user is currently connected, you need to see if there is a user lock being held.
Simplest way though is by using the JET show roster function. Here's a MSKB article with code:
http://support.microsoft.com/kb/198755
This is ADO based. There is a DAO alternative.
Also, your going to find CurrentUser() less then helpful unless you've established ULS (User Level Security) or Workgroup security, as it will return the user 'admin' for every user.
A better approach is to get the current netowrk login name. I have code for that if you want it.
JimD.
That's not quite right. While in most cases it is true, the .LDB file can contain "phantom users" who although listed, are not currently connected to a database. To actually determine if a user is currently connected, you need to see if there is a user lock being held.
Simplest way though is by using the JET show roster function. Here's a MSKB article with code:
http://support.microsoft.com/kb/198755
This is ADO based. There is a DAO alternative.
Also, your going to find CurrentUser() less then helpful unless you've established ULS (User Level Security) or Workgroup security, as it will return the user 'admin' for every user.
A better approach is to get the current netowrk login name. I have code for that if you want it.
JimD.
ASKER
Thanks all.