Deleting .mdb and .ldb files

G

Guest

How do I delete a .mdb and its associated .ldb file?
Here's the background. While I had an Access database open on my office PC I
copied its .mdb file to CD. When I later copied the .mdb file from the the CD
to my home PC, I found that the associated .ldb file was also on my home PC
hard drive. The .mdb dile won't open and I can't delete either file. Help!
 
D

Douglas J. Steele

Normally the ldb file is only present while someone has the mdb file open.
Note that this doesn't mean having it open through Access: reading the data
in the file through another client is sufficient to cause the locking file
to be open. Note, too, that closing Access incorrectly can prevent the
locking file from being closed.

If you're sure that nothing should be accessing the mdb file, you could try
rebooting the machine (to kill any rogue threads that may be attached to the
file) and then retry the deletion.
 
6

'69 Camaro

Hi, Maurice.
While I had an Access database open on my office PC I
copied its .mdb file to CD.

Never copy or backup an Access database while the file is open. You risk
backing up data in an inconsistent state, and you risk backing up a corrupt
database.
The .mdb dile won't open and I can't delete either file.

You either have a corrupt database or you have a file lock on the .LDB file.
Save all of your work and reboot. After rebooting, delete the .LDB file
before attempting to open the database file. If the database file still
doesn't open (i.e., you get an error message such as "The database has been
placed in a state by user 'Admin' on machine 'ComputerName' that prevents it
from being opened or locked"), then you have learned a valuable lesson, and
you will never copy or back up an open database again.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
G

Guest

Thanks, Douglas. I'll try that.
--
Maurice


Douglas J. Steele said:
Normally the ldb file is only present while someone has the mdb file open.
Note that this doesn't mean having it open through Access: reading the data
in the file through another client is sufficient to cause the locking file
to be open. Note, too, that closing Access incorrectly can prevent the
locking file from being closed.

If you're sure that nothing should be accessing the mdb file, you could try
rebooting the machine (to kill any rogue threads that may be attached to the
file) and then retry the deletion.
 
G

Guest

You were right, Doug. Once the rogue threads were killed by the reboot, I was
able to delete the unwanted files from my home PC.
 

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