Re: Forced disconnecting
- From: "mIKE" <doyouknowverhagen@xxxxxxxx>
- Date: Tue, 24 Jul 2007 09:35:24 -0600
Eric:
If the only users of the MDB are your applications, then you can try what
I've done. That is, I have each app check for some kind of "semaphore"
using a Timer component to control the interval. If the semaphore exists,
then it tells them to exit the app or it will be closed for them. I suppose
you could also just close the connection to the MDB as long as you also have
a way to open it again for them. For me, it was simpler to bounce them out
of the apps. Actually, it's a two-phase process. The first phase just pops
up a warning about pending automatic closure of the app, and the second
phase closes it. In my apps, the semaphore is a text file that also holds
an optional message that the admin can set to tell people things like when
the MDB is expected to be back on-line, or the person to call about it. The
logon routine also checks for this file and presents the desired message in
lieu of offering the sign-on screen.
It's also not too hard to get the machine-name of current users of the MDB
from your Delphi app. Then, if your "admin" program that needs exclusive
use keeps a directory of those names, it can tell you the person's
name/e-mail/location/phone number, etc., so you can try reaching them even
before creating the semaphore. Short of that, you can at least have your
admin program look for the existence of the LDB file to see if somebody is
hitting the MDB. These functions should work even if it's not your apps
that are hitting the MDB, or if it is your apps but you haven't implemented
a force-off scheme. Once nice thing about the force-off routine is that the
existence of the semaphore keeps new users from logging in while you're
getting existing users off.
mIKE
"Verstrepen Eric" <eric.verstrepen@xxxxxxxxxx> wrote in message
news:mn.4cb67d77d96e55e0.74077@xxxxxxxxxxxxx
How can i force users of an MS-Acces database with ADO to disconnect, so
that i can backup/repair the database ?
Regards,
Eric Verstrepen
.
- References:
- Forced disconnecting
- From: Verstrepen Eric
- Forced disconnecting
- Prev by Date: Re: Backup a SQL Database
- Next by Date: Access Relationships
- Previous by thread: Re: Forced disconnecting
- Next by thread: How to retrieve results of PRINT statements through ADO.
- Index(es):
Relevant Pages
|