qdb_getresultoption()

Updated: April 19, 2023

Return the value for a database session option when a SELECT command was issued

Synopsis:

#include <qdb/qdb.h>

int qdb_getresultoption( qdb_result_t *result, 
                         int option );

Arguments:

result
A pointer to a qdb_result_t structure that stores the result of a previous SELECT command.
option
The option whose value you want to query; see qdb_setoption() for the list of database session options.

Library:

qdb

Description:

This function indicates whether the specified database session option was on or off when a SELECT statement was run. You must first call qdb_getresult() to get the result of the statement. Then, you can call qdb_getresultoption() to determine what setting a certain option had. You must pass in the qdb_result_t structure returned by qdb_getresult() as well as a constant indicating which option you're querying.

Returns:

1
The value of the option was 1 (on).
0
The value of the option was 0 (off).
-1
The option isn't supported (errno is set).

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes