Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compact/Repair & Backup

Status
Not open for further replies.

mcongdon

Programmer
Mar 14, 2008
98
US
Hey guys,
I was wondering if there is a way to put a command on closing a database that would compact and repair it, create a dated backup file of itself, then close.
Any helpful hints on how to get started on this would be greatly appreciated.
Thanks!
 
If your version is 2000 or newer I beleieve you have a setting to compact on close.
 

But you have the order reversed! Compact & Repair is said to be a common cause of corruption! You need to always do a backup then Compact & Repair!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Thanks for the tip on compacting! Any ideas on how to create a backup automatically? I know in Access 2003 and Access 2007 there are easy commands to do this, but in 2000 there isn't. Is there VBA code that will automatically create a copy of the whole database? I don't want end users manually copying and pasting the database in windows explorer!
 
Take a look at this. It produces text files for all the objects in your database (handy for solving corruption issues too).
All the source code is included, so you could integrate it into your app with a little fuss.

Ben

----------------------------------------------
Ben O'Hara
David W. Fenton said:
We could be confused in exactly the same way, but confusion might be like Nulls, and not comparable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top