Errors Collection

This collection contains a set of Error objects, each of which represents an OLE DB provider-specific error (ADO itself generates run-time errors). The Errors collection can contain not only errors, but also warnings and even messages (generated by the T-SQL PRINT statement, for instance). The Errors collection is very helpful in providing extra detail when something in your ADO code has malfunctioned. When debugging ADO problems, you can dump the contents of the Errors collection to the Immediate window with the following code:

For Each objError In objConn.Errors

Debug.Print objError.Description Next objError

0 0

Post a comment