CompactDatabase vs CompactRepair

  • Thread starter Thread starter Phil Freihofner
  • Start date Start date
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.
 
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
 
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.
 
Back
Top