Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 2.7 KB

errors.md

File metadata and controls

46 lines (32 loc) · 2.7 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
OLE DB Errors
Learn about how errors are returned in the OLE DB Driver for SQL Server and how you can get information about them.
David-Engel
v-davidengel
05/06/2020
sql
connectivity
reference
OLE DB Driver for SQL Server, errors
OLE/COM errors
errors [OLE DB]
OLE DB error handling, about error handling
OLE DB error handling

Errors

[!INCLUDE SQL Server]

[!INCLUDEDriver_OLEDB_Download]

OLE/COM objects report errors through the HRESULT return code of object member functions. An OLE/COM HRESULT is a bit-packed structure. OLE provides macros that dereference structure members.

OLE/COM specifies the IErrorInfo interface. The interface exposes methods such as GetDescription. This allows clients to extract error details from OLE/COM servers. OLE DB extends IErrorInfo to support the return of multiple error information packets on a single-member function execution.

[!INCLUDEssNoVersion] can return multiple errors. An application can retrieve server errors one at a time by calling IMultipleResults::GetResult combined with ISQLErrorInfo and IErrorRecords.

The OLE DB Driver for SQL Server exposes the OLE DB record-enhanced IErrorInfo, the custom ISQLErrorInfo, and the provider-specific ISQLServerErrorInfo error object interfaces.

For information about tracing errors, see Data Access Tracing. For information about enhancements to error tracing added in [!INCLUDEssSQL11], see Accessing Diagnostic Information in the Extended Events Log.

In This Section

See Also

OLE DB Driver for SQL Server Programming