Identify PC by ldb

S

Stephen

I would like to identify who has my DB opened. I know that when the DB is
opened an ldb file opens with it. I can right click on the ldb and open it
with notepad to reveil the PC name(s) of who has it opened. I would like to
have a database that can evaluate an ldb to find the PC name(s) and store
this info temporarily in a table which I will then be able to reference to
tell me exactly who has my DB opened. Can someone please help me with this?
All I need to know is how to extract the PC name from the ldb file. The rest
I believe I can piece together.

Thanks in advance.
 
T

Tom van Stiphout

On Tue, 25 Nov 2008 20:58:00 -0800, Stephen

There is a DLL that can do this. A few minutes at search.microsoft.com
will reveal it.

-Tom.
Microsoft Access MVP
 
T

Tony Toews [MVP]

Stephen said:
I would like to identify who has my DB opened. I know that when the DB is
opened an ldb file opens with it. I can right click on the ldb and open it
with notepad to reveil the PC name(s) of who has it opened. I would like to
have a database that can evaluate an ldb to find the PC name(s) and store
this info temporarily in a table which I will then be able to reference to
tell me exactly who has my DB opened. Can someone please help me with this?
All I need to know is how to extract the PC name from the ldb file. The rest
I believe I can piece together.

You can identify the work station name and the Access user. Which is
generally Admin. You can't identify the network user id as that is
not in the LDB file.

Opening the .ldb file using notepad will show you both who's currently
in the database and some of the workstations which were in the
database. When a person exits Access their workstation name and
Access login id, Admin unless you are using Access security, are left
in a "slot" or record in the ldb file. This slot or record may get
overwritten the next time someone enters the MDB depending on what
slot or record is available previous to it in the ldb file.

Determining the workstation which caused the Microsoft Access MDB
corruption
http://www.granite.ab.ca/access/corruption/workstation.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
D

David H

If you just need to know who's in the database, one option is to create a
table in the backend and then in your startup routine append key information
such as WindowsUserId, date, time, PC name, etc. and then capture the primary
key for the record. Then to delete the information, thus indicating that the
person has logged out, create a hidden form and in the On_Close event delete
the record using the primary key that you captured in the startup. If a
record exists in the database from a few days back and you *know* no one is
currently in the database then you know that that user exited out abnormally
such as the Power was shut off, etc.

Its not necessarily full proof, but should get you started.

To get the WindowsUserID...
http://www.mvps.org/access/api/api0008.htm

To get the computer Name...
http://www.mvps.org/access/api/api0009.htm
 
B

Brian

I tried the WindowsUserID code in api0008.htm as described in a different
thread and set the control source of a text box to =fOSUserName(), but all I
get is #NAME?.

How do I figure out what is wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top