Information in OLE DB Error Interfaces

SQLOLEDB reports some error and status information in the OLE DB-defined error interfaces IErrorInfo, IErrorRecords, and ISQLErrorInfo.

SQLOLEDB supports IErrorInfo member functions as follows.

Member function Description
GetDescription A descriptive error message string.
GetGUID The GUID of the interface that defined the error.
GetHelpContext Not supported. Returns zero always.
GetHelpFile Not supported. Returns NULL always.
GetSource The string Sqloledb.dll.

SQLOLEDB supports consumer-available IErrorRecords member functions as follows.

Member function Description
GetBasicErrorInfo Fills an ERRORINFO structure with basic information about an error. An ERRORINFO structure contains members that identify the HRESULT return value for the error and the provider and interface on which the error applies.
GetCustomErrorObject Returns a reference on an ISQLErrorInfo interface.
GetErrorInfo Returns a reference on an IErrorInfo interface.
GetErrorParameters SQLOLEDB does not return parameters to the consumer through GetErrorParameters.
GetRecordCount The count of error records available.

SQLOLEDB supports ISQLErrorInfo::GetSQLInfo parameters as follows.

Parameter Description
pbstrSQLState Returns a SQLSTATE representing for the error. SQLSTATE values are defined in the ANSI SQL92, ODBC and ISO SQL, and API specifications. Neither Microsoft SQL Server nor SQLOLEDB define implementation-specific SQLSTATE values.
plNativeError Returns the SQL Server error number from master.dbo.sysmessages when available. Native errors are available after a successful attempt to initialize a SQLOLEDB data source. Prior to the attempt, SQLOLEDB always returns zero.