We help IT Professionals succeed at work.
Get Started

Unable to compact/repair MDB in 64-bit Windows7

Last Modified: 2013-11-29
Greetings ... I'm trying to compact/repair a database on a 64-bit Windows7 machine with Office 2007 programatically via the fucntion at the bottom of this message.

The compact/repair function is called several times throughout the entire process to ensure the backend database does not bload beyond 2gigs (and become unusable).  It's successfully compacting/repairing the first few times it is called, but always seems to fail on the 3rd or 4th time it is called.  When it fails, it returns "Reserved Error 2950"

At this point, if I exit the app, and then open the backend database and try to manually compact/repair it, it gives the following error message: "Could not use '<file path>'; file already in use."  Closing it / trying it multiple times produces the same message.

There is no LDB file set on the backend, no other users on my machine, nobody else is in the database.  No clue why this is happening!

If anyone has any insight, it would be greatly aprpeciated.

Watch Question
This problem has been solved!
Unlock 1 Answer and 14 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE