CompactDatabase vs CompactRepair

P

Phil Freihofner

I'm noticing there are two different methods:
DbEngine.CompactDatabase
Application.CompactRepair

Does the "CompactDatabase" function also do repairing operations?
Does the "CompactRepair" have a place in the syntax for a password?

Thanks.
 
T

Tom van Stiphout

On Wed, 21 Apr 2010 00:30:01 -0700, Phil Freihofner

For several versions the Compact and Repair functions have been
combined. I think you can use either method interchangeably.

-Tom.
Microsoft Access MVP
 
D

David W. Fenton

For several versions the Compact and Repair functions have been
combined. I think you can use either method interchangeably.

More specifically:

During the Jet 3.5 time frame, Microsoft addressed the fact that
sometimes repairing a non-corrupt MDB would actually corrupt it.
Thus, they elminated repair as a separate process (though the
command for it was left intact, I guess). It was instead neutered so
that it first check to see if a file was in need of a repair and
only repair then. This is as part of the COMPACT process only, so
far as I understand.

In other words, don't use repair at all. Just compact the database
and Jet will take care of any necessary repairs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top