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

Exclusive Access - and don't let anyone else in!

Status
Not open for further replies.

suzey

MIS
May 30, 2002
29
0
0
AU
Hello everyone,

I currently have a runtime database that opens exclusively with the /excl command on the shortcut.

Unfortunately if the database is already open, and someone else tries to open it, it gives the following message :

'You can't open 'c:\data\thedatabase.mde' for
exclusive use because another user has the database
open'

'Will open the database for shared access'

With an OK button as the only option. It then opens the database, and allows me to edit data.

What I would really like is that the first person opens it and the second person who tries top open it, gets a message that says the file is already open, and then quits back out, instead of opening the database in shared mode.

Anyone got any ideas?

Thanks in advance


Sue
 
Ideas:

1. Ensure that everyone's opening it in exclusive mode. Apparently someone else is opening the db in normal mode, therefore you're able to get in afterwards. This is the best solution, trust me on this.

2. There are programmatical solutions, in which you mark the database as "already opened" when someone enters the database, and disallows anyone else to use the database until the database is no longer "already opened". This leads to problems when the user doesn't close the database down like you would like, therefore the database is left as "already opened"...forever. So these types of solutions are worse.



Just make a shortcut to the database and force everyone to use it, and tell them not to log on in shared mode. Most of the programmatical solutions require some sort of shortcut to work properly anyway.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
Thanks foolio12,

I found a shortcut without the /excl command on it.

Next time I'll be checking everything with my open eye!


Sue

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top