ODBC Driver Error Codes

This topic provides a list of SQLSTATE error codes that can be returned by the ODBC driver.

In addition to the error codes listed below, the ODBC driver can return errors from the JDBC layer. These error codes are described in Exception Messages and SQL States.

SQLSTATE Error Code Error Message
01004 The buffer was not large enough to return the string and string is truncated.
01S00 Unknown connection attribute provided.
01S02 Option value changed.
07005 No result set available.
07005 The cursor name passed was NULL.
07009 Invalid descriptor index.
08002 The specified handle has already been used to establish a connection.
08003 The underlying physical connection to data source was never opened or is closed.
0A000 ODBC method is not yet implemented.
24000 Invalid cursor state: an open cursor exists for this statement. Possible cause is failure to invoke SQLCloseCursor.
24000 Invalid cursor state: no open cursor exists for this statement.
25S02 Transaction is still active. Commit or rollback the transaction.
HY001 The driver was unable to allocate memory required to support execution or completion of the function.
HY003 Invalid C data type specified.
HY004 Invalid parameter type specified for parameter.
HY009 The handle argument was NULL.
HY010 Function sequence error.
HY011 Attribute value cannot be set now after statement prepare.
HY012 The argument was neither SQL_COMMIT nor SQL_ROLLBACK.
HY012 Cannot commit or rollback in a shared environment.
HY024 Invalid attribute value.
HY090 Invalid string or buffer length.
HY091 Invalid descriptor field identifier.
HY092 The value specified for the option was not valid.
HY092 Invalid handle type.
HYC00 The requested optional feature is not yet implemented.
HYC00 The driver or data source does not support the conversion specified by the combination of the value specified for the argument ValueType and the driver-specific value specified for the argument ParameterType.
HYC00 Unknown attribute.
IM001 Driver does not support this function.
IM003 Unexpected driver name.
XJ028 Unexpected connection attribute value provided.