Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.61 KB

File metadata and controls

32 lines (26 loc) · 1.61 KB
title SQLSTATE (ODBC Error Codes) | Microsoft Docs
ms.custom
ms.date 03/06/2017
ms.prod sql-server-2014
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 MightyPen
ms.author genemi
manager craigg

SQLSTATE (ODBC Error Codes)

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