Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
henv = __Database_Init() If henv == -1 Then Return -1 hdbc = __Database_InitSQL(henv) If hdbc < 0 Then Return -2 ret=qConfigData(2, "Microsoft Access Driver (*.mdb)", "COMPACT_DB=%db_nam% %db_nam% General", @FALSE) qFreeConnect(hdbc) qFreeEnv(henv)
cMDB = "c:\MY.MDB" ;Full path/name of access db cBkup = "c:\MYBCKUP.MDB" ; Backup file name oDB = CreateObject("Access.Application") oDB.CompactRepair(::LogFile=@TRUE,SourceFile=cMDB,DestinationFile=cBkup) oDB=0 If FileExist(cBkup) FileCopy(cBkup,cMDB,@FALSE) FileDelete(cBkup) EndIfI would hold off on the FileDelete(cBkup) unil I was sure things worked as planned. NOTE: the Access file must not be opened on the PC.
Article ID: W17142
File Created: 2007:07:03:14:28:28
Last Updated: 2007:07:03:14:28:28