Error Objects
The error programming task is represented by the Automation error object. An error object is an object that contains detailed information about an error.
Each interface method reports a return code indicating whether the method succeeded or failed. In some cases, if a method operates on an array of data structures, an array of status information is returned, reporting the state of each element of the array of data structures.
In addition, providers can expose OLE DB error objects that extend the Automation error object and that contain extended error information such as a description of the error or the appropriate SQLSTATE. Error objects can be created by any interface on any OLE DB object. Providers can also choose to define custom error objects.
For more information, see Errors.