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 querie开发者_运维百科s, and regularly store PDF attachments.
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.
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.
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.
精彩评论