none
用SQL语句恢复数据库时出现的问题 RRS feed

  • 问题

  •   On Error GoTo Handler


    Dim connter As Integer
             Dim workarea(12) As String
            ProgressBar1.Visible = True
            ProgressBar1.Max = UBound(workarea)
            ProgressBar1.Value = ProgressBar1.Min
            Me.MousePointer = 11
            For connter = LBound(workarea) To UBound(workarea)
                workarea(connter) = "initial value" & connter
                ProgressBar1.Value = connter
                Cn.Execute sql                         '执行SQL语句,恢复数据库
                Cn.Close
            Next connter
            ProgressBar1.Value = ProgressBar1.Min
            MsgBox "数据库恢复成功!!", 64, "提示信息"
            Me.MousePointer = 0

    Handler:
                         
              If Err.Number = -2147221499 Then
                      Resume Next
              Else
                      MsgBox Err.Number & vbCrLf & Err.Description
               End If

    3704
    对象关闭时,不允许操作

    另外 connter = LBound(workarea) To UBound(workarea)
    也不太懂,有没有其他实现进度条的方法啊?各位大哥帮忙看看
    2009年6月18日 2:12

答案

全部回复