|
The mi_error_sql_state() function retrieves the value of the SQLSTATE status variable from an error descriptor.
The mi_error_sql_state() function copies the value of the SQLSTATE status variable from the error descriptor that err_desc references into the user-allocated buffer that sqlstate_buf references. The SQLSTATE status value is a sequence of five ASCII characters with a null byte at the end. To indicate success, SQLSTATE contains a value of "00000". Other values indicate types of warnings and runtime errors. In particular, an SQLSTATE value of "IX000" indicates an Informix-specific error, which the value of SQLCODE identifies. You can use the mi_error_sqlcode() function to obtain the SQLCODE value from an error descriptor.
This function is intended for use with the MI_ERROR_DESC structure passed to a callback routine when the callback exception is of type MI_Exception.
| MI_OK | indicates that the function was successful. |
| MI_ERROR | indicates that the function was not successful. |
See the descriptions of the following functions: mi_errmsg(), mi_error_desc_copy(), mi_error_desc_is_copy(), mi_error_desc_destroy(), mi_error_level(), and mi_error_sqlcode().