Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 28th, 2007, 02:08 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Default .ldb lockfile

Hi,

I was writing code in my database and it stopped working. I can't open it up now at all. There is an .ldb file on my desktop now. Does anyone now why it is there or if I can do anything to open the db back up?

Thanks,
David

 
Old September 28th, 2007, 02:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Step 1. Make certain that EVERYONE is loggrd out of the database.
Step 2. If the .ldb file is still there, delete it.



Rand
 
Old September 28th, 2007, 04:33 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for replying rgerald!

I'm developing the database, so no one else logs into it.
I tried deleting the file, but then when I tried to open the db again the file would show back up.
I opened the ldb file up with notepad and it showed my pc name. I found a few things on the internet and they said this means the db is corrupt.
I ended up opening a new access db and importing everything from the corrupt db into the new one and it works fine now. It had me sweating it for a bit though.

 
Old October 1st, 2007, 06:42 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Whenever you open an mdb file, the ldb file is created in the same folder. This file tracks current users for the database. So the fact that the ldb file was on your desktop indicates that the mdb file you are working on is also on your desktop. This is normal behavior for Access. The locking up is not.

If there is no one else in the database, then you can just delete the ldb file as rgerald suggests.

While you are developing, you should go to Tools > Options > General and select Compact on Close. This will clean things up between development sessions. You want to uncheck this when you are done developing since it could take a long time to compact, unless that database is split, then it shouldn't add additional close time.

Also, periodically do a Compact and Repair Database to clean up after your coding. Notice the how the file size increases as you develop, and shrinks significantly after you compact and repair.

Hope that helps.


mmcdonal
 
Old October 1st, 2007, 09:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If after eliminating the old lock (.ldb) file, there is still a problem. Try doing a compact and repair on the database. Menu: Tools / Database Utilities / Compact and Repair Database


Rand
 
Old October 1st, 2007, 10:11 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the suggestions guys.

I had actually just done a compact/repair about 2 or 3 hours before the db locked up. I did find that I had an endless loop in my code once I got it imported into the new db. The loop was easily correctable though and I'm not sure why it would have messed up the db.
I had tried deleting the ldb file several times before I gave up on the db. Each time I deleted it then I clicked on the db to open it, but it locked up and put the ldb on my desktop again.

 
Old October 8th, 2007, 07:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 126
Thanks: 5
Thanked 0 Times in 0 Posts
Default

In regards to the .ldb file showing the PC name of who has the db open (if opened in notepad), does anyone know why the .ldb file would NOT show the PC name of who has the database open? My back-ends are up on our network, and sometimes it will show who has them open, and other times it will not. If it will not show me who has it open, I have to attempt a compact & repair on the back-end so it will error out and tell me it can't because user (PC name) has the database open. Then I'm getting people out one at a time until it will finally compact so I know I'm the only one in the back-end.

This isn't really a problem for me...its more of a nuisance and I thought I would ask.

Regards,
Laura

FYI...My user id has changed. My old id was lbreitenbach

The only thing standing between you and your goal is doubt. Quit doubting yourself and you'll be able to accomplish anything!
 
Old October 11th, 2007, 08:23 AM
Authorized User
 
Join Date: Mar 2007
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Laura

I have a great little program that reads these *.ldb files. I have it on my computer at work, i will investigate and post a link for you to download

Cheers
Darren

 
Old October 22nd, 2007, 12:54 AM
Authorized User
 
Join Date: Mar 2007
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Again

The program is called ldbview.exe if you google this it will show you where you can download it, i got mine from microsoft website. i doesn't allow you to close open files but at least it shows you who is logged into the ldb file.

P.S sorry i took so long getting back to you

Cheers

Darren






Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access .mdb & .ldb database corrupted faisal573 Access 17 December 6th, 2017 04:38 AM
ldb file leftover pohljl BOOK: Beginning Java 2, JDK 5 Edition 1 March 1st, 2007 11:26 AM
.LDB File Access 2000 mrideout BOOK: Beginning ASP.NET 1.0 0 January 1st, 2005 02:30 PM
Manage the .ldb file when ADO opens a Access .mdb marcelescu Visual C++ 1 October 18th, 2004 06:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.