用批处理文件进行ACCESS的压缩/修复
以下代码引自:http://www.codetoad.com/vb_compact_db.asp
Sample batch file:
@echo off
cls
REM ******************************************************************************
REM ** DB name is MyDatabase.mdb Access 2000 Type 5 Delete backup when finished
REM ******************************************************************************
echo. Compacting MyDatabase.mdb
CompMDB.exe /dMyDatabase.mdb /T5 /sD:\Misc Databases /LC:\Log2001 /DY /wC:\WorkArea
REM ******************************************************************************
REM ** DB name is Archive.mdb Access 95 Type 4 Delete backup when finished
REM ******************************************************************************
echo. Compacting Archive.mdb
CompMDB.exe /dArchive.mdb /T4 /sD:\Misc Databases /LC:\Log2001 /DY /wC:\WorkArea
REM ******************************************************************************
REM ** DB name is John.mdb Access97 Type 4 Do not delete backup when finished
REM ******************************************************************************
echo. Compacting John.mdb
CompMDB.exe /dJohn.mdb /T4 /sD:\Misc Databases /LC:\Log2001 /wC:\WorkArea
echo. Finshed!
echo.
Required prameters:
/F Name of the database (Without any path information)
/S Path to where the database resides
/T Type of database (4 = Access 95/97 5 = Access 2000/2002)
??? Type ?= Access 2003
Optional parameters:
/D Y or N to delete backup copy of database after the
compactepair has completed. Default = "N"
/L Path to log folder. If missing, /S parameter will be used.
/W Path to temp work folder. If missing, /S parameter will be used.
/? or ? This online help message
现在用的是OFFICE 2003,如何对该批处理文件进行修改
可以进行ACCESS的压缩/修复功能???
谢谢!!!
或者有没其他多用户环境下实现自动压缩/修复的好办法
(除关闭时自动压缩修复外)
[此贴子已经被作者于2007-1-5 10:34:28编辑过]
|