Custom Error Objects

OLE DB Programmer's Reference

A custom error object can be associated with each error record. An interface pointer to the object is stored in the record. If no custom error object exists, this pointer is null. The custom error object is the mechanism by which OLE DB error objects are extensible.

When an error record is added, the error object calls AddRef to add a reference to the custom error object. The provider that created the custom error object calls Release to release its hold on the custom error object. In this way, ownership of the custom error object is effectively transferred from the provider to the error object. The error object releases all custom error objects when it is released.

For example, ODBC-related providers can expose ISQLErrorInfo on a custom error object to return the SQLSTATE value. For more information, see ISQLErrorInfo.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net