SQLSTATE mappings
Several SQLSTATEs differ when you call SQLGetDiagRec()
or SQLError()
under
an ODBC 3.0 driver. All deprecated functions continue to return ODBC
2.0 SQLSTATEs regardless of which environment attributes are set.
The following list shows the affected SQLSTATEs:
- HYxxx SQLSTATEs replace S1xxx SQLSTATEs
- 42Sxx SQLSTATEs replace S00xx SQLSTATEs
- Several SQLSTATEs are redefined
The following table lists ODBC 2.0 to ODBC 3.0 SQLSTATE
mappings.
ODBC 2.0 SQLSTATE | ODBC 3.0 SQLSTATE |
---|---|
22003 | HY019 |
22007 | 22008 |
22005 | 22018 |
37000 | 42000 |
S0001 | 42S01 |
S0002 | 42S02 |
S0011 | 42S11 |
S0012 | 42S12 |
S0021 | 42S21 |
S0022 | 42S22 |
S0023 | 42S23 |
S1000 | HY000 |
S1001 | HY001 |
S1002 | HY002 |
S1003 | HY003 |
S1004 | HY004 |
S1009 | HY009 or HY024 S1009 is mapped to HY009 for invalid use of null pointers; S1009 is mapped to HY024 for invalid attribute values. |
S1010 | HY010 |
S1011 | HY011 |
S1012 | HY012 |
S1013 | HY013 |
S1014 | HY014 |
S1015 | HY015 |
S1019 | HY019 |
S1090 | HY090 |
S1091 | HY091 |
S1092 | HY092 |
S1093 | HY093 |
S1096 | HY096 |
S1097 | HY097 |
S1098 | HY098 |
S1099 | HY099 |
S1100 | HY100 |
S1101 | HY101 |
S1103 | HY103 |
S1104 | HY104 |
S1105 | HY105 |
S1106 | HY106 |
S1107 | HY107 |
S1110 | HY110 |
S1501 | HY501 |
S1506 | HY506 |
S1C00 | HYC00 |