SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
E-6
Error Messages
Recovery:
Create a new table with the correct number of columns that
has the same contents as the old table.
>>
Error Messages
SQL returns error and warning information through SQLCI and through programmatic
interfaces.
Each SQL error message is associated with a negative number and each SQL warning
message is associated with a positive number. Some SQL messages are associated
with both a negative (error) and a positive (warning) number because the problem can
cause an error in certain situations and a warning in others.
You can use the ERROR command in SQLCI to get information about a specific error
or warning. You can also modify the SQLCI session options DISPLAY_ERROR,
ERROR_ABORT, ERROR_TEXT, and WARNINGS to control SQLCI action when an
error or warning occurs. For more information, see ERROR Command on page E-4 or
SET SESSION Command on page S-39.
Within a program, SQL returns error information to the SQLCODE field in the SQLCA
data structure. Specific error messages are not intended to be handled
programmatically, but are intended to be passed directly to users or stored in tables.
There are cases in which an SQL statement can return a different error than it did in a
previous version of SQL.
For more information about handling errors and warnings within programs, see the
SQL/MP programming manual for your host language.
For a complete list of SQL error and warning messages, including those that are
displayed by SQLCI or sent to programs in addition to those sent to the EMS
subsystem, see the SQL/MP Messages Manual.