ADO Errors

ADO (ActiveX Data Objects) have their own error-reporting system. Because an ADO operation can generate more than one error, the standard VBA error-trapping mechanism is not sufficient, as the Err object is limited to providing information about the one most recent error. With ADO, error information is accumulated by the Connection object that represents the program's connection to the data source. The Connection object has an Errors collection that contains one Error object for each error that occurred during the most recent ADO operation. If an ADO error occurs, you can use this collection to obtain information about the error(s) that occurred.

Some ADO operations do not require the existence of a Connection object. When there is ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.