Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











OBJECT:  Error

Error

The ADO Error object contains detailed information about any data access errors or warnings that have been generated during a single operation.

When an error occurs, the provider is responsible for passing an error text to ADO. In turn, each time an error or warning occurs, ADO generates an Error object which contains the details of the specific error. Each of these Error objects is then stored in the Errors collection, which is a collection that is unique to the Connection object. In order to access these errors, you must refer to the specific connection.

Remember, each Error object contains only one error. Since multiple errors might have occurred, you may need to enumerate through the collection of Error objects. For example, in VBScript:

Code (VBScript):
For Each objError in objConnection.Errors
   Response.Write objError.Description & VBCRLF
Next


PROPERTIES

Description Property
Returns a string that describes the error. This is the default property.

Syntax: errorobject.Description

HelpContext Property
Returns a long value that is the context ID in the help file (if it exists) for the error.

Syntax: errorobject.HelpContext

HelpFile Property
Returns a string that is the path and name of the help file (if it exists).

Syntax: errorobject.HelpFile

NativeError Property
Returns a long value that is the database error information for a specific Error object.

Syntax: errorobject.NativeError

Number Property
Returns a long value that is the unique number that identifies an Error object.

Syntax: errorobject.Number

Source Property
Returns a string that is the name or ID of the object or application that generated the error.

Syntax: errorobject.Source

SQLState Property
Returns a five character string that is the SQL error code.

Syntax: errorobject.SQLState

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information