access|数据|数据库|压缩<%
oldDB = "d:\net\accessTest.mdb"
bakDB = "d:\net\accessTestBack.mdb"
newDB = "d:\net\accessCompact.mdb"
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
' back up database
FSO.CopyFile oldDB, bakDB , true
' compact database
Set Engine = Server.CreateObject("JRO.JetEngine")
prov = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Engine.CompactDatabase prov & OldDB, prov & newDB
set Engine = nothing
' delete original database
FSO.DeleteFile oldDB
' Move (rename) compacted database
FSO.MoveFile newDB, oldDB
set FSO = nothing
%>
介绍一个用ASP来压缩ACCESS数据库的例子
80酷酷网 80kuku.com