What is the activeX data object (ADO) error object?

The ActiveX Data Object (ADO) module includes different objects, including the ADO error object. The ADO error object contains information about data access errors that are generated during a single operation.

For every one error, ADO generates one error object. The error objects are stored in the Error Collection. Each error object contains details of the specific error. If we want to access an error, we must define a specific path.

The error object has certain properties associated with it, which are described below:

Properties

  • Source: Returns the name of the object or application from which the error is generated.

  • Number: Returns the unique number as a long int, through which the error is identified.

  • NativeError: Returns the error code from the data source that specifies the provider-specific error code.

  • HelpFile: Returns the full path of the Help file, which is in the Microsoft Windows help system.

  • HelpContextID: Returns the context ID of a topic in the Help file of the Microsoft Windows help system.

  • Description: Returns the description of the error.

  • SQLState: Returns the SQL error code of 5 characters when an error occurs due to processing an SQL statement.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved