Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 1.98 KB

File metadata and controls

35 lines (28 loc) · 1.98 KB
title SQLSTATE (ODBC Error Codes) | 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 ODBC driver, errors
ODBC error handling, cause information
messages [ODBC], cause information
SQLSTATEs
errors [ODBC], cause information
ms.assetid 84cce528-edb0-473f-a85f-3eb87fbe2cf3
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

SQLSTATE (ODBC Error Codes)

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

SQLSTATE provides detailed information about the cause of a warning or error. For errors that occur in the data source detected and returned by [!INCLUDEssNoVersion], the [!INCLUDEssNoVersion] Native Client ODBC driver maps the returned native error number to the appropriate SQLSTATE. If a native error number does not have an ODBC error code to map to, the [!INCLUDEssNoVersion] Native Client ODBC driver returns SQLSTATE 42000 ("syntax error or access violation"). For errors that are detected by the driver, the [!INCLUDEssNoVersion] Native Client ODBC driver generates the appropriate SQLSTATE.

For more information about the state error codes, see the following topics:

See Also

Handling Errors and Messages