<%

	Application.Contents.RemoveAll()
	
	Dim fs, Engine
	Set fs = CreateObject("Scripting.FileSystemObject")
	DataName = Request("DataName")
	If fs.FileExists(Server.Mappath(DataName)) Then
		Set Engine = CreateObject("JRO.JetEngine")
		Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath(DataName), "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath(DataName & ".temp")
		fs.CopyFile Server.Mappath(DataName & ".temp"),Server.Mappath(DataName)
		fs.DeleteFile(Server.Mappath(DataName & ".temp"))
		Set fs = Nothing
		Set Engine = nothing
		Response.write "<p>压缩数据库完成..."

	Else		
		Set fs = Nothing
		Response.Write "<p><br><br>数据库名称或路径不正确. 压缩失败!" & vbCrLf
	End If



%>