<%
EskiDB = Server.MapPath("dbadresi.mdb")
YeniDB = Server.MapPath("yenidbadresil.mdb")
BakDB = Replace(EskiDB, "mdb" ,"BAK")
Set objJRO = Server.CreateObject("JRO.JetEngine" )
Set objFSO = CreateObject("Scripting.FileSystemObject" )
If (objFSO.FileExists(EskiDB)) Then
Set SourceFile = objFSO.GetFile(EskiDB)
SourceFile.Copy BakDB
objJRO.CompactDatabase "Data Source=" & EskiDB, "Data Source=" & YeniDB
SourceFile.Delete
Set compDB = objFSO.GetFile(YeniDB)
compDB.Copy EskiDB
compDB.Delete
Else
End If
Set objJRO = Nothing
Set objFSO = Nothing
%>