ADO Error objects
Error objects
ADO Error object contains a single operation (involving providers) related to data access error details.
ADO will generate an error due to each Error object. Each Error object contains detailed information about the specific error, and Error objects are stored in the Errors collection. To access these errors, you must refer to a specific connection.
Loop through the Errors collection:
<%
for each objErr in objConn.Errors
response.write("<p>")
response.write("Description: ")
response.write(objErr.Description& "<br>")
response.write("Help context: ")
response.write(objErr.HelpContext & "<br>")
response.write("Help file: ")
response.write(objErr.HelpFile & "<br>")
response.write("Native error: ")
response.write(objErr.NativeError & "<br>")
response.write("Error number: ")
response.write(objErr.Number & "<br>")
response.write("Error source: ")
response.write(objErr.Source & "<br>")
response.write("SQL state: ")
response.write(objErr.SQLState & "<br>")
response.write("</p>")
next
%>
for each objErr in objConn.Errors
response.write("<p>")
response.write("Description: ")
response.write(objErr.Description& "<br>")
response.write("Help context: ")
response.write(objErr.HelpContext & "<br>")
response.write("Help file: ")
response.write(objErr.HelpFile & "<br>")
response.write("Native error: ")
response.write(objErr.NativeError & "<br>")
response.write("Error number: ")
response.write(objErr.Number & "<br>")
response.write("Error source: ")
response.write(objErr.Source & "<br>")
response.write("SQL state: ")
response.write(objErr.SQLState & "<br>")
response.write("</p>")
next
%>
grammar
objErr.property
Attributes
Attributes | description |
---|---|
Description | Returns a description of the error. |
HelpContext | Back Microsoft Windows help system content ID of a topic. |
HelpFile | Microsoft Windows help system returns the full path of the Help file. |
NativeError | Error code returned from the provider or data source. |
Number | Returns identifies the error a unique number. |
Source | Returns the name of an object or a wrong application. |
SQLState | Returns a 5-character SQL error code. |