Link to home
Start Free TrialLog in
Avatar of mjoyce
mjoyce

asked on

Forcing database into exclusive to repair file

Hello,

I've got an Access database which is concurrently accessed by about 30 users (just to add records, nothing much else).
Just today my PC crashed while I was in the database, and in design mode for a form (silly, I know. I won't do it again).

THe database then needed repairing: a simple process, but first I needed to boot out the 30 odd users (by going around to their desks), then repair the database. Now I get the message that the database is locked exclusively by Admin, which is me.
I've tried loading the database, then repairing it; opening access, then trying to repair the database; and running both the /excl and /repair command lines, but to no avail.

a) Is this a network thing, where I need to get the sysadmins to reset the file (they're taking their time about this as I write)

b) Is there a way I can force all users out of a database?

c) Why does Access say I've got it open exclusively, when I know I haven't? I reset the PC, same difference.

Thanks,

Michael
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

<<a) Is this a network thing, where I need to get the sysadmins to reset the file (they're taking their
time about this as I write)>>

  Access still think someone is in the MDB.  The sysadm needs to close the file if it's still marked as open.  At that point, you'll be able to delete the LDB file (try that anyway first as it my already be unlocked).

<<b) Is there a way I can force all users out of a database?>>

  No, it must be built into the app.  A2000 with ADO does offer a passive shutdown method, but it won't boot out people already in.  Just stops new ones from going in.

<<c) Why does Access say I've got it open exclusively, when I know I haven't? I reset the PC, same difference.
>>

  Because a user lock is still being held by the NOS.

Jim.
Hi Michael,

If non of Jim's suggestions works, then you might need to reset to application server. This will definitly unlock your files.

Hope this helps,

Nosterdamus
ASKER CERTIFIED SOLUTION
Avatar of Bob Scriver
Bob Scriver
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
mjoyce,

Sorry, the message statement should use the Format function to format the time appropriately.

Bob Scriver
Avatar of mjoyce
mjoyce

ASKER

Thanks for this. It's a nice, tidy solution to the problem.

I've split my database into two as suggested, but if a problem occurs again I'll add the Admin database.
I can see how this Admin database is necessary. The main reason to force an exit of a database is if the back end becomes corrupted. If the shutdown data was stored in the main back end, it would no longer be accessible.

mjoyce,
Thanks correct.  You wouldn't be able to force the shutdown because you couldn't set the flag and the time field.  In addition, I have an Administrative form on the front end that directly accesses that one record on the backend from the tblDBParameters.  It allows for an easy setting of any of the flags and fields to setup the shutdown.  

Also, this shutdown doesn't necessarily have to be used for a corrupt database situation.  Let's say you have update the database with new fields or tables.  This just gives you a way to clear the users off.  This method was born out of frustration when I was working in one of our offices where I had over 100 users and had to go around and make sure everyone was off the system.  Yuk!!

Another problem with a front end application is the universal distribution of a new version of the application.  I have solved that through the development of a database called VersionCheck.mdb that executes a module that compares the version number of the personal PC copy to a copy stored on the server.  If the server copy version number is greater than VersionCheck.mdb executes a CopyServerToPC.bat that performs a copy of the new version copy from the server to the location on the users PC and then executes a shell statement to startup the new application copy.

If you would like a copy of the Database just email me and I will return it to you.

Bob Scriver