mi_integer mi_tab_check_msg(MI_AM_TABLE_DESC *tableDesc, mi_integer msg_type, char *msg[, marker_1, ..., marker_n])
If msg_type is MI_SQL, an error occurred. The syserrors system catalog table contains the message.
If msg_type is MI_MESSAGE, the pointer in the msg argument contains the address of an information-only message string.
If msg_type is MI_SQL, msg points to a 5-character SQLSTATE value. The value identifies an error or warning in the syserrors system catalog table.
When a user initiates the oncheck utility, the database server invokes the am_check purpose function, which checks the structure and integrity of virtual indexes. To report state information to the oncheck utility, am_check can call the mi_tab_check_msg() function.
The syserrors system catalog table can contain user-defined error and warning messages. A five-character SQLSTATE value identifies each message.
The text of an error or warning message can include markers that the access method replaces with state-specific information. To insert state-specific information in the message, the access method passes values for each marker to mi_tab_check_msg().
To raise an exception whose message text is stored in syserrors, provide the following information to the mi_tab_check_msg() function:
The access method can allocate memory for messages or create automatic variables that keep their values for the duration of the mi_tab_check_msg() function.
The DataBlade API mi_db_error_raise() function works similarly to mi_tab_check_msg(). For examples that show how to create messages, refer to the description of mi_db_error_raise() in the IBM Informix: DataBlade API Programmer's Guide.
None
See the descriptions of: