qdb_stmt_exec()

Execute a precompiled statement

Synopsis:

#include <qdb/qdb.h>

int qdb_stmt_exec( qdb_hdl_t *db,
                   int stmtid,
                   qdb_binding_t *bindings,
                   uint8_t binding_count );

Arguments:

db
A pointer to the database handle.
stmtid
The ID of a precompiled statement to execute.
bindings
An array of qdb_binding_t structures containing pointers to data that will be bound to the variable parameters in the precompiled statement.
binding_count
The number of items in bindings.

Library:

qdb

Description:

This function executes a precompiled statement prepared with qdb_stmt_init(). If the SQL string previously passed to qdb_stmt_init() contains variable parameters, you can bind data to these parameters by placing the data values in one or more qdb_binding_t structures and then passing in these structures through the bindings argument. Parameters that aren't filled in are interpreted as NULL.

Returns:

0
Success.
-1
An error occurred (errno is set).

Examples:

See qdb_stmt_init() for an example on how to compile, execute, and free an SQL statement.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes