The SQLSTATE status value
The SQLSTATE status variable is a five-character string that the database server sets after it executes each DataBlade API function. The value of SQLSTATE indicates the status of the function execution. The SQLSTATE status variable is compliant with ANSI and X/Open standards.
Initial class-code value | Source of exception code | Additional information |
---|---|---|
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 | Informix, a DataBlade module, a C UDR, a client LIBMI application | Any of the error messages that are specific to Informix (those
that the X/Open or ANSI/ISO reserved range does not support) have
an initial class-code value of "I" (SQLSTATE value of "IX000"). If a UDR returns an error message that this routine has defined, the initial class-code value is "U" (SQLSTATE value of "U0001"). Other SQLSTATE class-code values can be defined by the implementation. |
After the database server executes a DataBlade API function, it sets SQLSTATE to indicate one of the status conditions, as the following table shows.
Status condition | SQLSTATE class code | SQLSTATE subclass code |
---|---|---|
Success | "00" | "000" |
Success, but no rows found | "02" | "000" |
Success, but warnings generated | "01" | For ANSI and X/Open warnings:
For
warnings specific to Informix:
For
literal warnings that DataBlade
API modules
raise:
For custom warnings that DataBlade API modules define: other subclass values, as defined in the syserrors system catalog table |
Failure, runtime error generated | For ANSI and X/Open errors: > "02" For errors that are specific to Informix: "IX" For literal errors that DataBlade API modules raise: "U0" For custom errors that DataBlade API modules define: other class codes, as defined in the syserrors system catalog table |
Error-specific value |