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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command line function for compacting an access database

Status
Not open for further replies.

Amapuche

MIS
May 25, 2002
25
AU
Hello,

We have access 2000 and it regularly corrupts, we have been trying to work out why this is occuring and we have ruled out 2 of the 3 microsoft support reasons:

1. Faulty Hardware
2. Opening and saving the mdb file in another program

We are investigating No. 3 which is Database is Suspect/Corrupted due to Interrupted write operation.

Anyway, Microsoft suggests that we compact the database regularly. I would like this to be scheduled as an overnight process and I was wondering if anybody knows if there is a command line function to trigger the compacting process for an access databse.

Thanks in advance

Mapuche.
 
Not sure about the command line side of things, however I've had problems with databases that corrupt and remain unopenable due to the db size.

The way I used to get around the problem was to use a program called jetcomp.exe, available from the support.microsoft.com web site (110k).

Unfortunately this is not a utility that can be scheduled to ru nin the background so may not be what you require, but hopefully it will give you a starting point?!
 
Found this on a web site just after posting this!

"Due to changes in the way the VBA Project and Access objects are stored in Access 2000, a call to Jet's CompactDatabase method may not reclaim all the space marked as deleted; whereas a Compact call will handle all cases (as before).

Access 2000 UI's "Compact and Repair Database" menu item,
Either the /compact or /repair command line flags for msaccess.exe."

Try adding /comapct or /repair onto a commnds line as a switch...

HTH's
 
Have you complex rules in a form when are some control visible or not? It may cause recursive calls of Form_Current.
If you test a form and have may open recordsets, in case of run time error the memory is lost.
I often find no other chance than copy all database object is a new empty database.

Here is my question:
How can I copy a table|form|etc without losing its creation and/or last modification date?
Regards
Frank Ferenc Nagy
|\ /~ ~~|~~~ nagyf@alpha0.iki.kfki.hu Fax: (36-1)-392-2529 New!
| \ | | Institute of Isotope and Surface Chemistry
| \ | -+- 1525 Bp. POB 77. Tel. :(36-1)-392-2550
| \| | `-' ' `-' "The goal of the life is the struggle itself"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top