Welcome to MSDN Blogs Sign in | Join | Help

Microsoft Access Team Blog

Get product announcements, tips and tricks, and news directly from the team @ Microsoft.
KB article 950812: Compact and repair might delete your database (Access 2007)

KB article 950812 provide more information about a scenario where some people have reported that a compact and repair deletes their database. You can’t download the fix directly but can get it by calling CSS. This fix will be included in SP2 when that ships (I don’t have an ETA). Here is the most relevant part of the article:

In Office Access 2007, when you try to compact an .accdb database, you may receive the following error message:

Microsoft Office Access can't delete database name.accdb after compacting it. The compacted database has been named Database.mdb.
If you compact a database using the same name, Microsoft Access creates a new compacted database and then deletes the original database. 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 original database, and then rename the new database using the original name.
If you can't remove the read-only status, inform your workgroup administrator.

Additionally, after you click OK, you receive the following error message:

Could not find file 'database name.accdb'

Then, the original .accdb database and the temp-compacted Databasex.mdb database are removed unexpectedly.

Posted: Thursday, May 29, 2008 8:20 AM by Clint Covington

Comments

Heather Ackmann said:

Wow!  Thanks for the heads-up.

# May 29, 2008 1:11 PM

Russell Sinclair said:

Glad to see you've posted this to the blog. This one killed  quite a bit of work for me.

FYI, there is a work around I detailed at one point to a team member. When the error message comes up, DO NOT click OK. Instead go to the folder and create  a copy of the “Database.mdb” file before Access has the chance to delete it. You can then safely click OK and Access will destroy the original Database.mdb database.

# May 29, 2008 3:35 PM

Tonys Microsoft Access Blog said:

If you're reading my blog then you should also be subscribed to the MS Access team blog. Nevertheless

# May 29, 2008 8:41 PM

Alan Cossey said:

Had to chuckle when I read the actual KB article. It says, "Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix." Presumably if you are only "slightly" affected, it is not worth installing the hotfix, whatever "slightly" might be.

# May 30, 2008 4:24 AM

Mike Kuehn said:

Is the new version of the Access Runtime going to come out at the same time as SP2? I think that the runtime users are going to want to hold off on  SP2 untill the runtime for that version is out.

# May 30, 2008 8:08 AM

Ye Olde Heritage Software Boys said:

Access 2003 fixes this problem and the Ribbon and the navigation pain (sic)

# May 30, 2008 12:24 PM

Garry Robinson said:

After 8 clicks and entering my hotmail password I ended up at this page http://support.microsoft.com/default.aspx/gp/services

Now having purchased my Access software over a year ago, would I get a free phone call or not or should I send an email and would someone answer it and give me a download link?  In other words, why not just provide the download link for the patch?  

By the way Russell is far smarter than me and he managed to delete his hard earned work, I would rather avoid that.

# May 30, 2008 3:15 PM

Vladimir Cvajniga said:

WOW! Anyway, I'm lucky since I don't develop in A2007 - I'm just testing how to get rid of the Ribbon, Tabs & Navigation Pain... but can't get through... :-(

# June 1, 2008 12:40 PM

Tony D'Ambra said:

I have responded to this issue by creating Backup Before Compact, an Access 2007 Add-In that automatically closes Access to unlock the database file, backups, and then compacts & repairs the database before re-opening it in Access 2007. A fail-safe feature renames the original file, which is retained as a temporary redundant backup until the tool is next used on the database.

You can download the free Add-in from my Free Access Tools page:

http://www.aadconsulting.com/freeaddins.html

# June 2, 2008 3:09 AM
New Comments to this post are disabled
Page view tracker