Return the number of rows affected by an SQL statement
#include <qdb/qdb.h> uint64_t qdb_rowchanges( qdb_hdt_t *db, qdb_result_t *result );
This function returns the number of rows affected by an SQL 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 not set, the function queries the database handle db 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, there was an error with the request.
QNX Neutrino
Safety: | Â |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |