Embedded SQL for C Error Message Format

Troubleshooting SQL Server

Troubleshooting

Embedded SQL for C Error Message Format

The errors and messages are returned to the application in an SQLCA data structure. The Microsoft® SQL Server™ message parts map to fields in the SQLCA data structure:

sqlerrmc

Contains text of the error message.

sqlerrd[1]

Contains the SQL Server error number.

sqlerrd[2]

Contains the SQL Server severity level.

Sqlstate

Contains the SQLSTATE run-time error codes as defined in Embedded SQL for C. These SQLSTATE codes are not related to any of the parts of a SQL Server message.