Dim objJRO = CreateObject("JRO.JetEngine") Dim strS As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\foxtable\商业版\CaseStudy\test.MDB" Dim strD As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\test.MDB" objJRO.CompactDatabase(strS, strD) msgbox("ok")