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

Auto Compact & Repair on mde file

Status
Not open for further replies.

LeighW

Programmer
Jun 6, 2001
45
GB
Is there a way I can automaticaly Compact and Repair an MDE file every night?

Is there a command line I can use in a batch file to do this?

I can't alter the mde file itself, as I am not the developer!

Thanks

Leigh
 
You shouldn't really have to compact an MDE file as it does not edit the tables. The tables are linked to this MDE from a back-end source.

MDE files do increase in size a little since you first placed it on a users local machine but not to any significant degree.

But if you really want to then in a shortcut do the following:

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "Your DB.mde" /wrkgrp "security file.MDW" /compact /repair

You can also add a username and password as follows if you wish. Just add it to the end:

/usr "your username" /pwd "your password"

You cannot repair the database if doing it nightly though as a confirmation message box appears and must be pressed to continue. Just compact if this is the case.

Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top