以下为引用的内容: </div><br> <div align="center">运行环境:在WIN98SE PWS、WIN2000 IIS5.0 <br> <% Const JET_3X = 4 Function CompactDB(dbPath, boolIs97) Dim fso, Engine, strDBPath strDBPath = left(dbPath,instrrev(DBPath,"")) Set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists(dbPath) Then Set Engine = CreateObject("JRO.JetEngine") If boolIs97 = "True" Then Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpath, _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "temp.mdb;" _ & "Jet OLEDB:Engine Type=" & JET_3X Else Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpath, _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "temp.mdb" End If fso.CopyFile strDBPath & "temp.mdb",dbpath fso.DeleteFile(strDBPath & "temp.mdb") Set fso = nothing Set Engine = nothing CompactDB = "你的数据库, " & dbpath & ", 已经被压缩" & vbCrLf Else CompactDB = "你输入的数据库路径或名称未找到,请重试" & vbCrLf End If End Function %> </div> </div> <form name="compact" method="post" action="compact.asp"> <div align="center"> <font size="2"><b><font color="#FF0000"> 压缩选项,请仔细填写!</font></b><br> <br> |