SQLSTATE Values (sorted by SQLSTATE Code)

The following table describes the ANSI equivalents to an XDB mode error codes. The ANSI error value is stored in the SQLSTATE element of the SQLCA.

ANSI SQLSTATE XDB mode SQLCODE DB2 SQLCODE
N/A -50 -614
N/A -106 -155
00000 0 N/A
02000 +100 N/A
21000 -811 N/A
21502 -246 -534
22001 -23 -302
22001 -59 -404
22002 -188 -305
22002 -305 N/A
22007 -247 -181
22515 -51 -603
23501 -141 -161
23501 -144 -652
23502 -86 -407
23503 -229 -530
23503 -146 -616
23504 -227 -531
23504 -228 -532
23505 -18 -803
23505 -40 -803
23505 -803 N/A
24501 -16 -501
24501 -215 -501
24502 -214 -502
26501 -125 -514
37501 -291 -199
37501 -212 -104
37503 -7 -10
37507 -72 -112
37511 -179 -604
37512 -20 -84
37514 -284 -637
37515 -289 -644
37517 -2 -198
40000 -156 -911
40502 -32 -913
40502 -35 -913
40502 -76 -913
40502 -153 -913
40502 -154 -913
40502 -155 -913
40502 -157 -913
40502 -158 -913
40502 -159 -913
40502 -160 -913
40502 -344 -926
42501 -277 -551
42501 -91 -551
42503 -278 -553
52001 -55 -121
52003 -9 -206
52004 -28 -159
52004 -280 -204
52010 -48 -601
52010 -56 -601
52010 -118 -601
52010 -174 -601
52010 -281 -601
53001 -290 -620
53002 -54 -117
53002 -57 -117
53002 -54 -117
53002 -57 -117
53003 -73 -122
53003 -75 -122
53003 -103 -119
53005 -66 -125
53009 -138 -156
53013 -140 -160
53018 -11 -401
53018 -12 -401
53019 -43 -402
53020 -4 -405
53021 -58 -408
53023 -71 -412
53024 -127 -414
53025 -83 -415
53026 -82 -421
53028 -231 -510
53029 -185 -126
53032 -104 -607
53032 -124 -607
53032 -130 -618
54001 -19 -101
54002 -6 -102
54003 -47 -107
54003 -87 -107
54003 -88 -107
54003 -119 -107
54003 -177 -107
54003 -279 -107
54004 -26 -129
54008 -46 -602
54011 -61 -680
56002 -244 -118
56005 -80 -127
56008 -108 -153
56013 -79 -150
56023 -288 -512
56024 -287 -513
56201 -343 -925
58002 -44 -685