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!

How does the Access database know it is accessed by someone 3

Status
Not open for further replies.

seaport

MIS
Jan 5, 2000
923
US
I have an Access database as a web database. I want to update some tables in the database when no one is accessing it. How do I write the code to detect on one else is access the database except me?

Thanks in advance.

Seaport
 
Maybe I did not make my question clear. I need the code to detect whether I am the only user accessing the database.

The ldb file cannot be useful to me, since when I am using the database, the ldb file is always present.

Seaport
 
If you'll post your email address I'll send you an mdb that contains code and a form to determine who is logged onto a network at any particular time. I didn't write this, but I use it and it works fine - really a cool tool.

Uncle Jack
 
Thanks Jack,

My email address is seaport2001@netscape.net.


seaport
 
Although the last post, which references code to report network user connections, is helpful, the only definitive way of solving your problem is as follows ... and its simple.

Open up your Access database in exclusive mode. If you successfully open it up in exclusive mode, you can safely perform your database work knowing that noone else can gain access to it. If someone else is in, you'll be informed that an exclusive access attempt is not possible.

You might want to use the tool mentioned in the previous post to identify who might be preventing you from getting exclusive access, but, the key is getting exclusive access.
 
zero

You deserve a star.

Everyone: notice what he did. He looked at the problem:

"I want to update some tables in the database when no one is accessing it"

Then he looked for a simple Access solution.

I wish more IT people were like you, Zero.

mike.stephens@bnpparibas.com
 
Zero did look at my question from another perspective.

However, I still need Jack's code. The database I talked about is a web database, so I prefer not to open it exclusively since I do not want to block internet users from accessing the database.

It takes only a few seconds to udpate the tables I need in the database. What I want to do is to create the function making sure no one else is accessing the database, and then update the tables immediately.

Did I make the issue too complicated? Each time when an Internet user accesses the database, the process only takes one or two seconds. So the chance that I and any Internet user access the database at the same time is small. Maybe I should just go ahead to update the tables without any detection.

Seaport
 
"The ldb file cannot be useful to me, since when I am using the database, the ldb file is always present."

Just for information and future reference, you can open the ldb file using Notepad. This will display the names of all users logged on to the database at that time.

 
I'll be happy to send you the code. However, the EMail address you supplied did not work.

Uncle Jack
 
Jack,

My email address is seaport2001@netscape.net

I just tested it.

Could you send the code to me ago?

Thanks

Seaport
 
UnckeJack, that code which you and Seaport have been discussing: would it be possible to mail it to me?
I am also looking for a way to check who it using the database.
My address is nachandler@hotmail.com

I am also looking for a simple way to set up a transaction log to keep track of who does what in my database. I say "simple" because I am quite a new user. So if anyone can help that would be great.

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top