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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A new file is created when I close the DB

Status
Not open for further replies.

pbxrookie

Programmer
Nov 11, 2003
16
0
0
US
Everytime I close my database, a new file is created. Example: The file name is Main.mdb. When I close the file, it creates another file DB1.mdb then DB2.mdb. Is there a way to stop this from happening?
 
pbxrookie
Have a look at Microsoft Knowledge Base article 208778

The .ldb is a temporary file. It's a way that Access' Jet database engine has of ensuring that data doesn't get lost.

However, the .ldb file is supposed to close when you close down Access. And it will under normal circumstances. And when one .ldb file doesn't close, it seems to replicate itself with successive closings.

I had the same thing happen to me recently, and the problem was that I had a module which was causing corruption. Once I fixed that module, there was no further problems.

You could hitting Ctrl-Alt-Del and see if you can "end" the .ldb application. That may or may not work.

I also found that if I restarted the computer, then opened the database and shut it down, the replicated .ldb files were closed.

Hope that helps a bit.

Tom
 
Hi,

Possibly you have 'Compact on Close' set.

Go to Tools->Options->General tab, in there is a checkbox for 'Compact on Close'.

Not sure if this creates a new copy or not.

Regards,

Darrylle

"Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
pbxRookie and Darrylle
It seems that whether or not "Compact on Close" is set, an .ldb file is created every time a database is closed, providing that the database is opened for "shared access."

I'm not sure what happens if a database is set up to be opened for "exclusive access."

I use "Compact on Close" without difficulties.

Tom

 
Let's go over this...

1. LDB files are created immediately upon entering a database. As long as one or more users are 'connected' to the MDB file, the LDB file will stay in existence.

2. When all users 'leave' the database, the LDB file is deleted.

3. The original poster said db1.MDB, db2.MDB files are being created, not LDB files.

4. Compacting a database involves a few steps: a) create a 'temp MDB file', starting with db1.mdb, then db2.mdb, etc...; compact this new file; b) delete original file, c) move 'temp MDB file' to original filename.

5. For network folders, you can deny people the ability to delete files. This can cause problems when you have a 'compact on close' option set. This can disrupt the compact process when you attempt to do part b), leaving a dangling 'temp MDB file' in the folder.

6. Another thing that causes errors in compacting is database corruption. This can also lead to dangling 'temp MDB files'.


So I'm going to go with Darrylle on this one...
 
agree with foolio12....possible corruption. Start a new database and import all objects. This should solve your problem.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
My sincere apology.

Thanks to foolio12 for showing that I obviously misread the original post. I misread .mdb for .ldb, and since I have never had a dangling .mdb file left, but did have a run-in with dangling .ldb files recently, I guess .ldb is what I saw.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top