isc_sql_interprete()
Go Up to API Function Reference
Builds a SQL error message string and stores it in a user-defined buffer.
Syntax
void isc_sql_interprete(
short SQLCODE,
char *buffer,
short buffer_length);
| Parameter | Type | Description |
|---|---|---|
|
|
|
Variable containing a |
|
|
|
Application buffer into which to store a SQL error message |
|
|
|
Length, in bytes, of |
Description
Given a SQLCODE value less than zero, isc_sql_interprete() builds a corresponding SQL error message string, and stores it in a user-defined buffer. The size of the buffer, in bytes, must also be passed to this function.
To display a SQL error message corresponding to a SQLCODE value, use isc_print_sqlerror() instead of this call.
Example
The following code fragment illustrates a call to isc_sql_interprete():
#include <ibase.h>
long SQLCODE;
char err_buf[256];
. . .
if (status_vector[0] == 1 && status_vector[1]) {
SQLCODE = isc_sqlcode(status_vector);
isc_sql_interprete(SQLCODE, err_buf, sizeof(err_buff));
}
Return value
None.