You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Diagnostics for Desktop Database Drivers | Microsoft Docs
ms.custom
ms.date
01/19/2017
ms.prod
sql
ms.prod_service
connectivity
ms.reviewer
ms.technology
connectivity
ms.topic
conceptual
helpviewer_keywords
Jet-based ODBC drivers [ODBC], diagnostic information
desktop database drivers [ODBC], diagnostic information
ODBC desktop database drivers [ODBC], diagnostic information
diagnostic information [ODBC], desktop database drivers
ms.assetid
1c3740eb-62c6-4009-b4b2-570fcf5661e4
author
David-Engel
ms.author
v-daenge
Diagnostics for Desktop Database Drivers
All errors and warnings not checked or partially checked by the Driver Manager are handled by the driver. The driver also maps native errors, or errors returned by the data source, to SQLSTATEs. Each function listed in the ODBC Programmer's Reference contains a "Diagnostics" section that specifies conditions and messages.
Applications call SQLGetDiagRec to retrieve SQLSTATE, native error code, and diagnostic messages. Calling SQLGetDiagField and specifying the field retrieves individual diagnostic fields. The support level of the diagnostic identifiers is listed in the following table.
DiagIdentifiers
Support level
SQL_DIA_DYNAMIC_FUNCTION
Not supported
SQL_DIAG_CLASS_ORIGIN
Supported. Always "ODBC 3.0" for versions 3.0 and later of this driver.