Appendix C. ADO Errors

Errors are commonplace to any application. Usually, the development environment has a default exception-handling mechanism. In Visual Basic, this mechanism is the On Error statement.

All Visual Basic errors can be trapped using this mechanism, but sometimes errors occur outside of Visual Basic. In these cases, the Visual Basic exception-handling mechanism does little if any good. This is especially true with ADO where errors can occur after execution has left your Visual Basic application and has gone to the data providers.

ADO allows your Visual Basic application to deal with data-provider errors through a special object: the Error object.

Get ADO: ActiveX Data Objects 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.