DSQL Requirements

From InterBase

Go Up to Additional Requirements


API applications that build or prompt for DSQL queries at run time require careful declaration, initialization, and population of extended SQL descriptor area (XSQLDA) structures for data transfer to and from the database. In addition, many API functions, such as isc_dsql_allocate_statement() and isc_dsql_describe(), also make use of statement handles for DSQL processing.

ibase.h provides typedefs for the XSQLDA structure, and its underlying structure, the XSQLVAR. It also provides a #define for the statement handle, a macro for allocating the appropriate amount of space for an instance of an XSQLDA in an application, and #defines for DSQL information parameters passed to ­isc_dsql_sql_info().

The following code illustrates how to declare an XSQLDA structure for use in an application, and how to declare a statement handle:

#include <ibase.h>
. . .
XSQLDA *insqlda;
isc_stmt_handle sql_stmt;
. . .

For more information about DSQL programming with the API, see Working with Dynamic SQL.

Advance To: