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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List current users from .ldb file?

Status
Not open for further replies.

zoroaster

Programmer
Jun 10, 2003
131
GB
I have a VBA procedure which updates several back-end Access databases and then compacts them remotely; however this will only work if I have exclusive access to each of the back-end databases, and since they are used quite heavily it's hard to find time in the working day when this is the case. I can use Dir(path/database.ldb) to find out whether the file is locked and in use, and wait until that ldb file disappears before compacting, but is there any way to interrogate the ldb file from within VBA to list which machines/users are logged into the back-end database in order to contact them to co-ordinate compacting. I know the .ldb file is essentially a text file, but is it available to interrogate with VB using the Access Object model?

Laters, Z

"42??? We're going to get lynched!
 
No, you can't.
if 2 users login and one of then logout, the .ldb file will still show both of them.
you can have a table that record login user and delete it when logout.
 
Thanks Orna, I've experimented with the login table, but can only get it to work where users login directly into the database; however, the databases I'm updating are downloads from our HR system, and used as a back-end for numerous other databases, which I don't have administrative control over to add this functionality. There's no system table with logged-in users is there?

Laters, Z

"42??? We're going to get lynched!
 
Thanks Zameer, you've pointed me in the right direction, that works fine. Ufortunately all the users come up as 'Admin', and I was hoping to get the value of the environ('username') variable, but I suspect this can only be resolved via our network/user configuration.

Laters, Z

"42??? We're going to get lynched!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top