SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Exception Handling and Error Conditions
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
13-3
SQL/MX SQLSTATE Values
SQL/MX SQLSTATE Values
NonStop SQL/MX has extended SQL:1999 SQLSTATE values to include other
situations not described by ANSI values. If an SQL:1999 SQLSTATE value exists for
an error condition, NonStop SQL/MX returns that value, as listed in Table 13-1 on
page 13-2. Otherwise, NonStop SQL/MX returns a value listed in Table 13-2.
Date-time field overflow 008
Substring error 011
Division by zero 012
Invalid escape character 019
Unterminated C string 024
Invalid escape sequence 025
Trim error 027
Integrity constraint violation 23 (No subclass) 000
Invalid cursor state 24 (No subclass) 000
Invalid transaction state 25 (No subclass) 000
Invalid SQL statement name 26 (No subclass) 000
Invalid authorization specification 28 (No subclass) 000
Dependent privilege descriptors
still exist
2B (No subclass) 000
Invalid character set name 2C (No subclass) 000
Invalid SQL descriptor name 33 (No subclass) 000
Invalid catalog name 3D (No subclass) 000
Invalid schema name 3F (No subclass) 000
Transaction rollback 40 (No subclass) 000
Statement completion unknown 003
Syntax error or access rule
violation
42 (No subclass) 000
With check option violation 44 (No subclass) 000
Table 13-2. Mapping of SQLCODE to SQL/MX-Defined SQLSTATE Values
SQLCODE SQLSTATE
Class
Origin
Subclass
Origin Description
0 00000 ISO 9075 ISO 9075 Successful completion
Table 13-1. SQL:1999 SQLSTATE Class and Subclass Values (page 2 of 2)
Condition Class Subcondition Subclass