Compact and Repair database

  • Thread starter Thread starter TS Lim
  • Start date Start date
T

TS Lim

I'm writing a program for my user to do the repair and compact of the backend.

I found two vba comands from the help file:
1. expression.CompactRepair(SourceFile, DestinationFile, LogFile)
2. expression.CompactDatabase(SrcName, DstName, DstLocale, Options, password)

It seem that I can only use No 2. because my backend is password protected.
My quesiton is: is command No 2 doing only compact and not repair, or it
perform the same as No 1, doing both compact and repair.

Thank you.
 
You have the basic idea, but there is a great deal more to know to be able to
perform a compact and repair of the back-end from your front-end. For
instance, you first have to ensure exclusive connection to the db (no one
else can be in it at the time). Anyways, your best best is to look at
existing examples rather start to reinvent the wheel. If you google 'vba
compact and repair back-end' you'll find tons of information and examples.
Also, below are two that I found, the 1st of which is from a very good source
(I would tend to start there).

http://www.rogersaccesslibrary.com/forum/topic378.htm
http://bytes.com/topic/access/answers/208170-how-compact-repair-back-end-front-end
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
Back
Top