The Connection Object - Collections of the Connection Object
(Page 15 of 15 )
The collections are discussed in depth in Chapter 8.
The Errors Collection
This collection contains all Error objects created in response to a single failure involving the provider.
Connection.Errors
The Errors collection is only cleared by ADO when another ADO operation generates an error.
Note that along with errors, the Errors collection often contains warnings and other informational messages from the provider. For this reason, it’s a good idea to use the Errors collection’s Clear method before certain operations; this ensures that warnings are relevant to the most recent operation. In particular, you should use the technique on a Recordset object’s Resync, UpdateBatch, and CancelBatch methods, or on its Filter property. On a Connection object, use this technique for the Open method. Explicitly clearing the errors allows you to use the Count property of the collection to quickly identify whether errors have occurred.
The Properties Collection
This collection contains all Property objects for a Connection object.
Properties = Connection.Properties
The Properties collection is discussed in more detail in Chapter 8, and a full list of the available properties is in Appendix C.
This is from ADO Programmer's Reference, by Dave Sussman (Apress, ISBN 1590593421). Check it out at your favorite bookstore today. Buy this book now. |
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |