使用ADO怎样判断已经断开了数据库的连接
展开全部
ADO控件连接数据库失败时会自动弹出一个对话框来说明连接失败。
别你还可以用
Private Sub Adodc1_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
Debug.Print Description
End Sub
捕获错误内容。
别你还可以用
Private Sub Adodc1_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
Debug.Print Description
End Sub
捕获错误内容。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询