域名查询系统用到的类(4)


            Exit Sub
        End If
        If Fso.FileExists(DataBasePath) Then
                Fso.CopyFile DataBasePath,strDataBasePath & "CompactDBTemp.mdb"
                Set Engine = CreateObject("JRO.JetEngine")
                If BoolIs97 = "True" Then
                    Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDataBasePath & "CompactDBTemp.mdb", _
                    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDataBasePath & "CompactDBTemp1.mdb;" _
                    & "Jet OLEDB:Engine Type=" & JET_3X
                Else
                    Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDataBasePath & "CompactDBTemp.mdb", _
                    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDataBasePath & "CompactDBTemp1.mdb"
                End If
            Fso.CopyFile strDataBasePath & "CompactDBTemp1.mdb",DataBasePath
            Fso.DeleteFile(strDataBasePath & "CompactDBTemp.mdb")
            Fso.DeleteFile(strDataBasePath & "CompactDBTemp1.mdb")
            Set Fso = nothing
            Set Engine = nothing
            If Err.Number <> 0 Then
                Err.Clear()
                Exit Sub

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3691.html