qdb_gettransstate()

Return the size of a database

Synopsis:

#include <qdb/qdb.h>

int qdb_gettransstate(qdb_hdl_t *hdl);

Arguments:

hdl
A pointer to the database handle.

Library:

qdb

Description:

This function returns the connection state for the current QDB connection. If the connection is in an SQL transaction, this function returns 1, and 0 if it the connection is not an SQL transaction. It returns -1 if there's an SQL error (you can use qdb_geterrmsg() to get the error string).

You can use this function to determine how to clean up after an SQL error, for example when you execute several commands including a transaction and need to determine which statement casued the error.

Returns:

=0
There is no SQL transaction in progress.
1
An SQL transaction is in progress.
-1
An SQL error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

qdb_geterrmsg()