Compact error

untitled

New member
Local time
Today, 06:16
Joined
Jan 17, 2017
Messages
3
Hi everyone,

I know that similar error have been already posted but none of the answers resolved my concerns.

Sometimes I get this error message even though my database (which has front and back end) is not supposed to compact - there is nothing in the code that makes it to compact and the compact check on database options is unchecked.


Code:
If you compact a database using the same name, Microsoft Access creates a new compacted database and then deletes the original datbase. In this case, however, the original database wasn't deleted because it is read-only.

If you can, remove the read-only status, delete the origianl, and then rename the original name. If you can't remove the read-only status, inform your workgroup administrator."

Do you have any idea why this happens?

Thank you!
 
Untitled,

You probably have the option checked to "Compact On Close".

It should be in Options --> Current Database

Wayne
 
No, as I said that option is unchecked. That's it's hard to understand why it happens (rarely though)
 
When is the error occurring? Does it actual do the compact and repair? If so is the compact and repair done on the frontend or backend?
 
An automatic repair will rarely occur after some sort of radical DB Engine failure, but usually you would get a message to that effect before it happens. By "rarely" - I recall seeing it maybe twice since Access '97 was the big thing; I could not reproduce the problem (and wasn't sure I wanted to try at that time.)

A C&R is ALWAYS done on the FE file. To C&R the BE file, you need to directly open the BE file under circumstances when nobody is using the BE at the moment.
 
Thank you for your response. It is definitely related to front end. So you say it is always compacting no matter what I put in the options menu?
 
So you say it is always compacting no matter what I put in the options menu?

No. I'm saying that whatever DB you opened with Access, when you do a C&R on the "current" database, it is that one. If you opened the FE directly, you C&R the FE. If instead you directly launched the BE, then THAT is the one that gets the C&R treatment.

{AMENDED}

It is possible to launch Access directly without launching any DB file, then go through the FILE menu to the Compact & Repair option at which point you can select which file you want C&R'd. Only that file will be affected.

The C&R that WILL NOT occur automatically is if you have an FE/BE split and open the FE. The BE would NOT be affected.
 
Last edited:
There may be a minor corruption causing the database instance to try to repair itself. You will probably see backup copies in the project folder.

I would be inclined to start again.
import everything into a new clean database.

Make sure you keep a decent history of working versions of your app.


(coincidentally, when I posted this, the forum software reported an error, but it still posted! spooky.

seems to error when posting a new comment, but not when amending an existing one.)
 
Probably only a minor point, but I doubt that the following is what Access actually reported, as it includes a spelling mistake. Assuming you retyped it, was there anything else ?

Code:
If you compact a database using the same name, Microsoft Access creates a new compacted database and then deletes the original datbase. In this case, however, the original database wasn't deleted because it is read-only.

If you can, remove the read-only status, delete the origianl, and then rename the original name. If you can't remove the read-only status, inform your workgroup administrator."

Edited to add : Likewise, the forum software reported an error but went ahead and posted anyway
 

Users who are viewing this thread

Back
Top Bottom