Compact Secured Database

nschroeder

nschroeder
Local time
Today, 09:28
Joined
Jan 8, 2007
Messages
186
I am trying to compact & repair a secured database. I log in exclusively as the administrator with the following shortcut property target: "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" f:\pathname\appname.mdb /User "adminname" /Pwd "adminpwd" /wrkgrp f:\pathname\appname.mdw /excl

When I run Compact & Repair, I get the following message: "Microsoft Office Access can't delete f:\pathname\appname.mdb after compacting it. The compacted database has been named f:\pathname\db1.mdb."

It goes on to say that it can't delete the original database because it is read-only (even though it is not).

Can I compact a secured database manually, or does it require some sort of utility?

Thanks.
 
I'm not sure what the problem is, but I can tell you that I have a secured db and I access it through an admin shortcut and I am able to compact and repair without any issues.

Could it be that your actual .mdb file is set to read only?
 
If you're running Access 2003 SP3 and your "f:" drive is a network drive, this is a known bug with SP3. When compacting a database on a network drive, it doesn't properly replace the database with the compacted version.

It will place a copy called db1.mdb in the same folder though. You can just rename the original database and then rename the db1.mdb to the correct name. You'll end up with a compacted database.
 
never heard that before, interesting... I still have not had any issues yet with SP3. Could it be that my db is saved as an Access 2000 db?

Either way, I'll have to remeber this.
 
It looks like there is a hotfix that may fix the problem. I just googled and found it, so I have yet to try it myself.

http://support.microsoft.com/kb/945674


Edit: I just installed it and it now works on my machine. I can compact & repair network databases just fine now! :)
 
Last edited:
Glad you found the hotfix (and bothered to look for it). That's the sort of initiative everyone asking questions in here should display! :)

And yes, the SP3 hotfix solves all sorts of bizarre, seemingly unrelated problems that SP3 brought with it.
 

Users who are viewing this thread

Back
Top Bottom