Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.83 KB

File metadata and controls

30 lines (24 loc) · 1.83 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
SQLSTATE (ODBC Error Codes)
When SQL Server ODBC driver runs stored procedures as remote stored procedures, the procedure can have integer return codes and output parameters.
markingmyname
maghan
03/14/2017
sql
native-client
reference
SQL Server Native Client ODBC driver, errors
ODBC error handling, cause information
messages [ODBC], cause information
SQLSTATEs
errors [ODBC], cause information

SQLSTATE (ODBC Error Codes)

[!INCLUDESQL Server Azure SQL Database Synapse Analytics PDW]

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