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!

.ldb file

Status
Not open for further replies.

jgarnick

Programmer
Feb 16, 2000
189
US
Does anyone know why the Access .ldb file does not go away when an Access database is closed? Because of this, I am not able to repair and/or compact the database because it thinks a user has it open. I'm pretty sure that the user that it says has it open did not shut Access down improperly either. Windows does not allow me to delete or cut and paste the file either! How can I get rid of it, and why does it happen??

Thanks!


jgarnick
jgarnick@aol.com

 
If you shut down the computer abnormally (ie blackout, bumped switch, etc) the file will remain on the system.

With the database closed you should be able to delete the file, but while its open it is protected.

Just open the access database and close it again it will normally remove the file by itself. If this doesn't work you may need to reboot and try this again.
 
I thought all the same things you mentioned above--I tried to open it and close it correctly--but nothing helped. It was definitely not open anywhere, and it did not let me delete the ldb file. I ended up having to reboot the server and it cleared it. I just don't know why it happens because the program was not shut down abnormally!

Thanks for your help--

jgarnick
jgarnick@aol.com

 
In a network environment, I have found that when the database is closed improperly, the server will still have resources open for it. If you go to the server manager and close the resources related to the file (.mdb and .ldb), then you should be able to delete the ldb file and compact the database. It has been my experience that even if the .ldb file exists, if there is no resources actually open for the database on the server, you will be able to compact and repair the database.

Mike Rohde
rohdem@marshallengines.com
 
Thanks Mike, I will keep that in mind for the next time! However, the machine that it said had the database still open, did not shut the database down improperly ??

jgarnick
jgarnick@aol.com

 
I have been trying to figure out for quite some time now what causes the resources to be left open. In your case, someone probably did exit the database improperly, but the person that it says in the error messsage is not always the person who did it.

I am experimenting with closing all my forms in code and using acSaveNo so that Access will not try and save the form when it closes. It seems that right now often times when they try and close when the back end is corrupt, they get a variety of save errors and memory errors. It often states that the form has been changed and asks them if they want to save there changes.

What I am trying to do with one of our high volume databases is force the users to close using my close button that closes all the forms without saving them before quitting the application. I disabled the for close button and the application close button so they have to close using my button. Hopefully this will clean up the server resources some.

Mike Rohde
rohdem@marshallengines.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top