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

Code to determine if another user has the database open 1

Status
Not open for further replies.

juddymarch

Technical User
Aug 10, 2007
17
Hi, done a few searches on google and on here but I can't find what I'm after. I'm just wondering if anyone knows if it is possible to determine if anyone else has the current database open. I want to quit out of the database if the user opens it but another user already has it open.

Thanks
Justin
 
Just force it to open exclusive. That way, if a second person tries to open it, they won't be able to.

Give them a shortcut that opens it exlusive, as per
eg to open the Northwind database with Access 2002 (XP) exclusively:

"C:\Program Files\Microsoft Office\Office10\msaccess.exe" "C:\Program Files\Microsoft Office\Office10\Samples\northwind.mdb" /Excl

John
 
just because I'd like to know ... why?

It is SUPPOSED to be a relational database, and should fully expect to be able to support multiple concurrent users ...



MichaelRed


 
Thanks for the replies, shortcut technique won't do it as the users may open it through explorer. I will have a look at your suggestion thanks KenReay.
The issue I have is that it is a database that is used in a large organisation, it is currently split with a front end under each users folder on terminal server. Occasionally users who know a bit too much tend to open the same frontend version from the same location (not their own folder).
This is currently not too much of an issue but it could become one as we are moving the backend to sql server and I have developed a couple of continuous forms that use temp tables stored in the frontend. I would prefer if users aren't accessing the same temp frontend table in the same database file. So it is basically a precaution i would like to have in place.

Thanks
Justin
 
Can I suggest using network file system permissions on your servers so that people can only get to their own copy of the front end application? (with admins having rights to look at all for support purposes).
Your server admin people should be able to do this without much hassle.

John
 
but she is saying that the same person opens multiple copies of the app using different techniques. i would assume that they would have to use the same log on, so the easy way to do it would be the open exclusive. of course, it would also be possible to simply maintain a log of current users a-la those routines which delve into the locking table ...




MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top