Поделиться через


IErrorRecords

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.

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.

This topic is a part of: