Error 对象清空试试行不行!!!

解决方案 »

  1.   

    出错处理中在出错就返回到上一级出错处理,如果没有就结束程序。你可以改为:On Error GoTo ErrCodeLblRetry:  DataEnvironment1.Connection1.ConnectionString =  Provider=SQLOLEDB.1;Password=" & LoginPw & ";Persist Security Info=True;User ID=" & LoginName & ";Initial Catalog=platformdata;Data Source=" & ServerIP & ";Connect Timeout=10"
      DataEnvironment1.Connection1.Open
    Exit Sub
    '''''''''''''''''''''''''''
    ErrCode:
      Static aa As Integer
      aa = aa + 1
      frmDBLink.Show 1
      If aa = 3 Then Exit Sub
      resume LblRetry
    End Sub