qdb_setoption()

Set a database connection option

Synopsis:

#include <qdb/qdb.h>

int qdb_setoption( qdb_hdt_t *db,
                   int option,
                   int value );

Arguments:

db
A pointer to the database handle.
option
The option to set. It can be one of:
QDB_OPTION_LAST_INSERT_ROWID
Automatically put the last inserted ROWID into any result you fetch. If this option isn't set, that data isn't included in the result structure and calling qdb_last_insert_rowid() will query the database connection for this information instead.
By default, this option is on.
QDB_OPTION_ROW_CHANGES
Put the number of rows affected by a statement into any result you fetch. If this option isn't set, that data isn't included in the result structure and calling qdb_rowchanges() will query the database connection for this information instead.
By default, this option is on.
QDB_OPTION_COLUMN_NAMES
Write the column names into the qdb_result_t structure returned by qdb_getresult(). If this option isn't set, that data isn't provided and calling qdb_column_index() won't work.
By default, this option is on.
QDB_OPTION_COLUMN_DECLTYPES
Write the declared column types in the qdb_result_t structure returned by qdb_getresult(). If this option isn't set, that data isn't provided and calling qdb_column_decltype() won't work.
By default, this option is off.
value
The new value for the option, either 0 (off) or 1 (on).

Library:

qdb

Description:

This function sets options for the database connection db. By default, all supported options are enabled (on) except for QDB_OPTION_COLUMN_DECLTYPES.

Returns:

>=0
Success. The previous value for option is returned.
-1
The specified option isn't supported (errno is set).

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes