views:

285

answers:

3

It didn't always do this, but ever since I split my database and made the front-end an ACCDE file, any time I try to compact and repair either file, a new file called "Database 1" is generated and my original file size doesn't change.

Is this normal?

My ACCDB is roughly 20MB, and my ACCDE is just over 1M after being used the first time. Before opening, the ACCDE was only 600k (I have lots of forms and queries, and regularly store PDF attachments.

+4  A: 

The new file is because the compact and repair process did not finish, so it cannot delete your original and rename the compacted file. This may be because it does not have exclusive access. Make sure that everyone is out of the system before you compact and repair. Check also that you have full permissions for the folder.

Remou
You should also have a look at the newly-created file to see if it has an MSysCompactErrors table. Normally, a compact attempted when you don't have exclusive access will not even start -- the Access UI gives you a message saying it can't do it because somebody else is using it. So, I'd suspect that something is failing in the actual repair operation.
David-W-Fenton
I tried with exclusive access and also looked for an errors table, neither seems to be the case for me.
NickSentowski
A: 

It depends how you do it.

When using the Jet Replication Objects (JRO) library the method JRO.JetEngine.CompactDatabase is defined as

Sub CompactDatabase(SourceConnection As String, Destconnection As String)

If you supply the same connection string for both arguments you get an error, "Database already exists".

Therefore, when using JRO yes it is normal for a new file to be created when compacting.

onedaywhen
I'm just using the compact and repair in the Office Button->Manage menu.
NickSentowski
A: 

In some cases it might be so, I'm having the same issue. In my case it's to do with the network drive it's on.

My workaround is to bring it into my C:\ and do it there, then I move it back to the network drive once the compact and repair is done.

Wai
Have you applied SP 2? See http://allenbrowne.com/Access2007.html#Bugs (search for "compact").
David-W-Fenton