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!

Front-end database is running deny another copy to be opened

Status
Not open for further replies.

noorani

Programmer
Dec 11, 2002
46
FR
my problem is that, if One copy of my Front-end database is running then how to deny another copy to be opened and show message that program is already running.

some time user working on the Front-end database, they open another copy of the same front-end to work on different functions of my database at a time.
how can i prevent my database from this situation.
 
There are a couple of different ways to address this situation.

The realist in me says "Tell your users NOT to open another copy of the database, or you'll hit them with a baseball bat. Then carry through on your threat.. (it's amazing how many people try to bluff their way through a situation like this :)

BUT the pragmatist in me says, "Create a table in your database. One Field. One Record. Write a value into it when you open the database. When you close the database, delete the record. When you open, check to make sure that there are NO records in the table. If there are, you know the database is opened already. If you need to allow multiple people to open the db, but only one copy apiece, you might need to use the user name as well.."

I'd prefer the large stick, but what the hey... :)

Jim

Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Hi WildHare , well i like both of your suggestions, i guess that you have been experienced with the basball advise, and got a gun shoot in return and luckily you are alive my congratulation. but i'm not brave enough like u to go for your first suggestion, but i do prefer the second one by creating a table with one field and one record. but the problem is that some time i use to close my Backend database for backup purpose and doing this i unload all the users automaticaly after some warring. and in this situation i won't be able to delete the record which have been created by the user. how to handle this situation.

may be some other person can give some advise ,without involving any violance act.

thanks in advance.. and thanks WildHare be aware next time if u use baseball u might wont be that much lucky.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top