SQL/MX 3.2 Messages Manual (H06.25+, J06.14+)

HP NonStop SQL/MX Release 3.2 Messages Manual691121-001
22-1
22
SQLSTATE Values Returned by
NonStop SQL/MX
NonStop SQL/MX returns SQLSTATE values that are defined in the ISO/ANSI SQL
standard and implementation-defined SQLSTATE values. See Subclause 22, “Status
Codes” in the ISO/ANSI SQL92 Standard “Database Language SQL.”
SQLSTATE and SQLCODE Considerations
Using SQLSTATE causes performance overhead because of the representation of
SQLSTATE as five characters. The overhead is most noticeable with short SQL
statements and in error situations.
Mapping SQLSTATE values to SQLCODE values can result in ambiguous
SQLCODE values:
SQLCODE values will often not map to a unique SQLSTATE value. For
example, see the many SQLCODE values mapped to SQLSTATE 42000 in
Table 22-1, SQLSTATE Values.
To deal with the problem of ambiguous SQLCODE values, HP recommends
retrieving the error message text or the SQLCODE value in addition to the
SQLSTATE.
SQLSTATE values for some SQL/MX error and warning messages might be
subject to change:
In the future, NonStop SQL/MX might return different SQLSTATE values for
error conditions than it does now.
In the future, SQL/MX’s error handling might use a different error path, and
therefore return a slightly different SQLCODE and implementation-defined
SQLSTATE value for an error.