Using Information in the Status Vector
From InterBase
Go Up to Handling Error Conditions
Whether or not an error occurs during the execution of an API call, InterBase loads the error status vector with status information. Information consists of one or more InterBase error codes, and error information that can be used to build an error message honed to a specific error.
An application can check the status vector after the execution of most API calls to determine their success or failure. If an error condition is reported, applications can:
- Display InterBase error messages using
isc_print_status()
. - Set a
SQLCODE
value corresponding to an InterBase error usingisc_sqlcode
(), and display theSQLCODE
and a SQL error message usingisc_print_sqlerror()
. - Build individual InterBase error messages in a buffer with
isc_interprete()
. The buffer must be provided by the application. Using a buffer enables an application to perform additional message processing (for example, storing messages in an error log file). This ability is especially useful on windowing systems that do not permit direct screen writes. - Capture a SQL error message in a buffer with
isc_sql_interprete()
. The buffer must be provided by the application. - Parse for and react to specific InterBase error codes in the status vector.
Topics
- Checking the Status Vector for Errors
- Displaying InterBase Error Messages
- Capturing InterBase Error Messages