bat file /excl /compact leaves db1.mdb after close

  • Thread starter Thread starter Jimbo213
  • Start date Start date
J

Jimbo213

Access 2003 on WinXP

I have been runing a BAT file nightly for 6 months with no problems.
I run it using windoze scheduler.
The last 3 nights it has been leaving the working file db1.mdb in the
directory.

Here is my BAT file [paths replaced with --]
"C:\--\MSACCESS.EXE" "\\--\EIA form.mdb" /WRKGRP "\\--\EIA.mdw" /user "xxxx"
/pwd "xxxx" /excl /compact

Any ideas? I just spent 30 minutes searching prior articles to no avail.

There is code to kick users off after 15 min of inactivity so I know there
is no one in the database. The same thing happens when I run it manually
with no users in [no LDB file].
 
What happens if you manually run the compact from the database? Do you
get the same thing happening.

IF so, your BAT file is probably fine. And as a guess, your database
has some type of corruption that the compact is not able to handle
correctly - for instance a bad index is being dropped. In this case the
process does not replace the old file with the newly compacted one.



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
hi Jimbo,
I have been runing a BAT file nightly for 6 months with no problems.
I run it using windoze scheduler.
The last 3 nights it has been leaving the working file db1.mdb in the
directory.

Here is my BAT file [paths replaced with --]
"C:\--\MSACCESS.EXE" "\\--\EIA form.mdb" /WRKGRP "\\--\EIA.mdw" /user "xxxx"
/pwd "xxxx" /excl /compact

Any ideas?
Use JetComp:

http://support.microsoft.com/?scid=kb;en-us;273956&x=10&y=5

maybe you're database has an defect and the compact didn't work properly.


mfG
--> stefan <--
 
Double check the permissions for the folder holding the database. You need
create, delete, read, write for the folder. Someone might have been messing
around and changed permissions.
 
Back
Top