DIM DBPATHDIM OBJFILESYSTEMDIM OBJENGINE
Dbpath = server.mappath (condatabasePath) 'Database path CondAsepath is a database file path constant
Set objfilesystem = creteObject ("scripting.filesystemobject")
IF ObjFileSystem.fileexists (dbpath) THEN
Set objEngine = CreateObject ( "JRO.JetEngine") objEngine.CompactDatabase "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & DBPath, "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & DBPath & ".Temp" objfilesystem.copyfile dbpath & ".temp", tmp_ Objfilesystem.deletefile (dbpath & ".temp")
Set objengine = Nothing
END IF
Set objfilesystem = Nothing