dB won't compact.

GizmoT

Registered User.
Local time
Today, 10:42
Joined
May 28, 2003
Messages
86
It has been a couple of months since I last compacted the database, so I thought I should do it again.

However, I get the following message:


Record(s) can't be read: no permission on c:\Application


I have checked the permissions, and I cannot find anything that as Admin I cannot read.

What is wrong?
 
Also - it seems that everytime I have attempted to compact the database, Access has created what looks like a compacted database on my hard-drive. Upon opening it, it seems to work fine and is the database I have been trying to compact.



Now, do I assume that this is the compacted database and start using it? Am I safe to assume that it will all work?
 
I wouldn't assume so. The process for a compact it...

Save the active db
Make copy of db
Compact copy db
Rename active db
Close renamed active db
Rename compacted copy to original name (if compact was successful)
Delete renamed original db
Open new compacted db

As this process is not being completed you could very well be missing some data.

If you can identify what is calling the c:\application that would be the best thing. Using that directory sounds like where Access is typically stored. It could be that there is not enough space in that directory to accomodate both the old and new db's at the same time (they both exists for a short period of time before the old one is deleted). This is my guess.
 
Autoeng

Thanks for the advice. I will give that a go.


I am sorry if I mislead you, I referred to c:\Application only as a method of abbrieviating the path. I don't think the space thing is an issue in this case. But thanks for the tip anyway.
 
Autoeng


I made a copy of the application as you suggested and tried to compact that. Still came up with the same error.





The application is linked to all the tables in a seperate database. Could this have an impact? Although it has never been a problem before.
 
Have you added any code to the Db, or is this the back-end Db?

If you have added new code (or not) make sure that the Db is compiled before the compact.
You may have a corrupt record in the Db, ihibiting the compact.
Try creating a New Db, importing all of your tables, forms etc into it then trying to compact that. If still no joy, I'd have a hunt through all the records to try to find a corrupt one.
 
Fizzio

I am ALWAYS adding code. The company I work for is constantly moving its goalposts. But I cannot find anything I have done recently that might cause a problem.

When I try to compile all modules, it throws out code that i KNOW works perfectly well, and gives all sorts of messages such as:


Invalid use of Me! keyword.

I wish I hadn't started this now. ;)

I guess I will have to bite the bullet and start c&p'ing everything to a new dB. God!! that is gonna take hours. It's quite a big dB



PS - how would you go about trying to find a corrupt record??
 
Last edited:
Thie import to a new Db is relatively nippy in comparison to finding a corrupt record.
It sounds very much like your code is causing the problem if it is throwing up errors like you have identified and this is no doubt the cause of your Db woes.

Finding a corrupt record is a combination of
1. Patience
2. Thoroughness
3. A pinch of good luck.

It involves trawling through the records at table level and looking for something that does not 'look right' - It is a bugger of a process and I'd love to hear of anyone's short cuts.

Good Luck (but that one won't help you find a corrupt record I'm afraid:( )
 
Quote

1. Patience
2. Thoroughness
3. A pinch of good luck.

Unquote


1. Don't have much of that
2. Not too bad there
3. Feeling REALLY lucky at the moment, but I wouldn't want to rely on it. Luck runs out.


Thanks for the advice, guys.


Since the dB is currently 306mb, and most of the code is now redundant, I might suggest that they start over.


I inherited the dB, from a cowboy who called himself a developer. I have had no training, but have taught myself quite a bit over the past few years, and have developed a few databases for other people/companies.

It is definitely a case that if they want to get to point x, you wouldn't want to start from where they are now.
 

Users who are viewing this thread

Back
Top Bottom