Cannot compact/repair db because file is already in use


G

Guest

I am having trouble compacting my db and the system tells me that my db is in
use. However, I know for a fact that I am the only person using the db on
the network. Has anybody ever encountered this problem?

Thanks for your help,
Mia
 
Ad

Advertisements

D

Danny J. Lesandrini

I've seen that happen, but never bothered to track down the issue.
What I noticed is that if no forms were open, then I wouldn't see
the error, so obviously, something on the Close event of my form
was interfering with the application closing, or something like that.

Try holding the shift key to open the database, and then compact.
Or better yet, use the JetComp utility (if it still exists) to compact
your mdb into a second file.
 
J

John Vinson

On Wed, 21 Dec 2005 11:40:05 -0800, "Blair Westman" <Blair
I am having trouble compacting my db and the system tells me that my db is in
use. However, I know for a fact that I am the only person using the db on
the network. Has anybody ever encountered this problem?

Thanks for your help,
Mia

If there is a .ldb file in the same folder as the .mdb file, with the
same filename, delete it first. This is a "lock" file created when you
open the database; it should be deleted when you close, but sometimes
isn't if you exit the database abnormally.

You can also compact the database without opening it using the command
line switch: in the Windows Start... Run menu type

msaccess.exe "X:\PathToYourDatabase\yourdata.mdb" /Compact

using your own disk, path,and filename of course.

John W. Vinson[MVP]
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top