Embedded SQL for C Error Messages

Troubleshooting SQL Server

Troubleshooting

Embedded SQL for C Error Messages

When developing and running Embedded SQL for C (ESQL/C) programs, you will see different status and error messages. All message numbers that are returned by ESQL/C are negative numbers.

The messages in the following table are generated by ESQL/C. Because the messages are not generated by Microsoft® SQL Server™, they do not appear in the sysmessages table.

Message number Run time/
compile time

Description
4998 C Attempt to connect to the specified database server failed.
19031 C Unable to open bindfile.
19051 C Too many sections.
19101 R Statement too long.
19103 R Illegal %s value %s.
Non-numeric %s value %s.
(Invalid number for the timeout value.)
19104 R/C Incorrect SQL statement syntax.
19199 C ESQL keyword(s) detected in PREPARE statement.
19306 C Host variable used but not declared.
19313 R Too few host variables.
19324 C Host variable may not be used in this context.
19408 R Invalid SQL data type for SQL_TYP_DECIMAL.
19413 R Data overflow occurred during decimal data conversion.
19422 R Unknown SQL Server data type.
19423 R Invalid destination data type.
19501 R No cursor declared.
19505 C Duplicate cursor name: %s.
19508 R Cursor is not positioned on a row.
19514 R Cursor is not prepared.
19517 R Cursor open attempted for non-SELECT prepared statement.
19521 R Open cursor failure for section %d of plans.
19523 R Failure to locate/close cursor. Section %d, plan %s.
19524 R Table for this cursor not updatable.
19525 R Attempt to fetch on unopened cursor.
19526 R No access plan for this cursor.
19527 R Could not get section for this cursor.
19528 R Connection for section %d of plan %s has NULL DBPROCESS.
19701 R NULL connection name.
    Connection %s not found.
19702 R Connection name not found.
    Attempt to close nonexistent connection.
19703 R Failed to get DBPROCESS.
Autoconnect failure.
19706 R Login failure in section %d.
19707 R Duplicate connection name.
19822 R Improperly initialized user SQLDA.
19911 C The SQL data type specified for a host variable is invalid.
19913 C The token identifier has already been used.
19917 C Invalid or incorrect option to sqlainit().
19946 C Cursor %s not declared.
19953 C Invalid call type.
19955 R Text not found in %s section %u.
19956 R Access plan section or statement text not found.
19957 R Access plan or statement text not found.
19994 R Can't run next BEGIN DECLARE sections. Statement ignored.
19995 R END DECLARE encountered without preceding BEGIN DECLARE statement. Statement ignored.
19999 C An internal error occurred.

See Also

Programming Embedded SQL for C