SQL/MX Programming Manual for Java

SQLJ Error Messages
HP NonStop SQL/MX Programming Manual for Java523726-003
D-90
SQLJ Run-Time Errors
SQLJ Run-Time Errors
Run-time errors occur when you execute an SQLJ program and include:
SQL/MX database errors returned through JDBC to the SQLJ run time
JDBC/MX errors returned to the SQLJ run time
SQLJ run-time errors as defined by the SQLJ standard
This subsection describes only the SQLJ run-time error messages. For descriptions of
SQL/MX error messages, see the SQL/MX Messages Manual. For descriptions of
some JDBC/MX errors, see the JDBC Driver for SQL/MX Programmers Reference.
For information about how to catch and display error messages in an SQLJ program,
see Handling Exception Conditions on page 3-60.
SQLSTATE Values
An SQLSTATE variable is a five-character string with two parts. The first part is a
two-character class code, and the second part is a three-character subclass code.
These SQLSTATE values are reserved for SQLJ run-time errors:
For descriptions of the errors associated with these SQLSTATE values, see the SQLJ
Run-Time Messages.
SQLJ Run-Time Messages
This subsection lists the SQLJ run-time messages according to their SQLSTATE
values. Errors without SQLSTATE values are listed alphabetically by their message
text in Messages Without SQLSTATE Values on page D-95.
Condition Class Subcondition Subclass
Successful completion 00 (no subclass) 000
No data 02 (no subclass) 000
Connection exception 08 (no subclass) 000
Connection does not exist 003
Cardinality violation 21 (no subclass) 000
Data exception 22 Fetching null to primitive
type
002
Incompatible data types 005
SQLJ-specific error 46 Default exception
(no subclass)
000
Unsupported feature 110
Invalid class declaration 120
Invalid column name 121
Invalid number of columns 122
Invalid profile state 130