IErrorRecords

OLE DB Programmer's Reference

IErrorRecords is defined by OLE DB. It is used to add and retrieve records in an OLE DB error object. Information is passed to and from OLE DB error objects in an ERRORINFO structure. For information about this structure, see "Error Records" in Chapter 16: Errors.

When to Implement

IErrorRecords is implemented by code in the Microsoft Data Access Components (MDAC) SDK.

When to Call

Consumers use this interface to retrieve information stored in the records of an OLE DB error object. They call QueryInterface to get a pointer to this interface after retrieving an OLE DB error object with IErrorRecords::GetErrorInfo in the Automation DLL.

Providers use this interface to add records to an OLE DB error object. If they get an existing OLE DB error object with IErrorRecords::GetErrorInfo in the Automation DLL, they call QueryInterface on that object to get a pointer to this interface. If they create a new OLE DB error object through a class factory or with CoCreateInstance, they request that a pointer to this interface be returned.

Method Description
AddErrorRecord Adds a record to an OLE DB error object.
GetBasicErrorInfo Returns basic information about the error, such as the return code and provider-specific error number.
GetCustomErrorObject Returns a pointer to an interface on the custom error object.
GetErrorInfo Returns an IErrorInfo interface pointer on the specified record.
GetErrorParameters Returns the error parameters.
GetRecordCount Returns the count of records in the OLE DB error object.

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