I am trying to report errors that occur with the ADO connection. Currently I have the following code:
What I would like is more specific errors. For instance I am using an Oracle database and if it is an Oracle error I would like for it to display that. Another example is this error check is done after the user enters their id and password if it is just a simple case of wrong user id or password I would like for the error message to include this.
Does anyone have information on how to do this? How to report Oracle errors through ADO?
Dim er As ADODB.Error
Dim errmsg As String
For Each er In objConn.Errors
errmsg = errmsg & "Description: " & er.Description & "<br>"
errmsg = errmsg & " Number: " & " " & er.Number & "<br>"
errmsg = errmsg & " Source: " & " " & er.Source & "<br>"
errmsg = errmsg & " SQL State: " & " " & er.SQLState & "<br>"
errmsg = errmsg & " Native Error: " & " " & er.NativeError & "<br>"
Next er
What I would like is more specific errors. For instance I am using an Oracle database and if it is an Oracle error I would like for it to display that. Another example is this error check is done after the user enters their id and password if it is just a simple case of wrong user id or password I would like for the error message to include this.
Does anyone have information on how to do this? How to report Oracle errors through ADO?
Dim er As ADODB.Error
Dim errmsg As String
For Each er In objConn.Errors
errmsg = errmsg & "Description: " & er.Description & "<br>"
errmsg = errmsg & " Number: " & " " & er.Number & "<br>"
errmsg = errmsg & " Source: " & " " & er.Source & "<br>"
errmsg = errmsg & " SQL State: " & " " & er.SQLState & "<br>"
errmsg = errmsg & " Native Error: " & " " & er.NativeError & "<br>"
Next er