Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 3.07 KB

File metadata and controls

49 lines (35 loc) · 3.07 KB
title Errors | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql
ms.prod_service database-engine, sql-database, sql-data-warehouse, pdw
ms.reviewer
ms.technology native-client
ms.topic reference
helpviewer_keywords
SQL Server Native Client OLE DB provider, errors
OLE/COM errors
errors [OLE DB]
OLE DB error handling, about error handling
OLE DB error handling
ms.assetid bd0612f4-96ef-4919-b0f9-b5447210fe93
author markingmyname
ms.author maghan
monikerRange >=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current

Errors

[!INCLUDEappliesto-ss-asdb-asdw-pdw-md]

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 [!INCLUDEssNoVersion] Native Client OLE DB provider 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

SQL Server Native Client (OLE DB)