To determine the success of an SQL statement, your program
must be able to interpret the value in the SQLSTATE variable. SQLSTATE consists
of a two-character class code and a three-character subclass code.
In the following figure, IX is the class code and 000 is
the subclass code. The value "IX000" indicates an
error specific to HCL
OneDB™. Figure 1: The structure of the SQLSTATE
code with the value IX000
SQLSTATE can contain only digits and capital letters.
The class code is unique but the subclass code is not. The meaning
of the subclass code depends on the associated class code. The initial
character of the class code indicates the source of the exception
code, which the following table summarizes.
Table 1. Initial SQLSTATE class-code values
Initial class- Code value
Source of exception code
Notes®
0 - 4
A - H
X/Open and ANSI/ISO
The associated subclass codes also begin in the
range 0 - 4 or A - H.
5 - 9
Defined by the implementation
Subclass codes are also defined by the implementation.
I - Z
Any of the error messages specific to HCL
OneDB (those
that the X/Open or ANSI/ISO reserved range does not support) have
an SQLSTATE value of "IX000".
If a user-defined routine
returns an error message was defined by the routine, the SQLSTATE value
is "U0001".