Return the number of rows affected by a statement
#include <qdb/qdb.h> uint64_t qdb_rowchanges( qdb_hdt_t *hdl qdb_result_t *result );
qdb
This function returns the number of rows that were affected in a statement. It first looks in result (if the QDB_OPTION_ROW_CHANGES option has been set by qdb_setoption()), returning the number of rows for the statement that produced the result. If result is NULL, or QDB_OPTION_ROW_CHANGES is off, the function queries the database handle hdl and returns the information about the last executed statement.
If this function returns 0, check errno to make sure that it is EOK, indicating that no row was affected (you should set errno to 0 before calling this function if you want to distinguish between an error and 0 rows). If errno is not EOK then there was an error with the request.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |