Return the transaction state for a QDB connection
#include <qdb/qdb.h> int qdb_gettransstate(qdb_hdl_t *hdl);
qdb
This function returns the transaction state for the current QDB connection. If the connection is in an SQL transaction, this function returns 1. If the connection is not in an SQL transaction, 0 is returned. If there's an SQL error, -1 is returned (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 caused the error.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |