ADO Error Object
ADO Error Object
Error Object
The ADO Error Object contains detailed information about data access errors related to a single operation (involving a provider).
ADO generates an Error Object for each error. Each Error Object contains detailed information about a specific error, and the Error Objects are stored in the Errors collection. To access these errors, you must reference a specific connection.
Loop through the Errors collection:
<%
for each objErr in objConn.Errors
response.write("
")
response.write("Description: ")
response.write(objErr.Description& "
")
response.write("Help context: ")
response.write(objErr.HelpContext & "
")
response.write("Help file: ")
response.write(objErr.HelpFile & "\n")
response.write("Native error: ")
response.write(objErr.NativeError & "\n")
response.write("Error number: ")
response.write(objErr.Number & "\n")
response.write("Error number: ")
response.write(objErr.Number &
")
response.write("Error source: ")
response.write(objErr.Source & "
")
response.write("SQL state: ")
response.write(objErr.SQLState & "
")
response.write("
")next
%>
Syntax
objErr.property
Property
| Property | Description |
|---|---|
| Description | Returns an error description. |
| HelpContext | Returns the content ID of a topic in the Microsoft Windows help system. |
| HelpFile | Returns the full path to a help file in the Microsoft Windows help system. |
| NativeError | Returns an error code from the provider or data source. |
| Number | Returns a unique number that identifies the error. |
| Source | Returns the name of the object or application that generated the error. |
| SQLState | Returns a 5-character SQL error code. |