qdb_geterrmsg()

Return the last error string

Synopsis:

#include <qdb/qdb.h>

const char *qdb_geterrmsg( qdb_hdl_t *db );

Arguments:

db
A pointer to the database handle.

Library:

qdb

Description:

This function returns a string containing an error message for the most recent call to one of:
  • qdb_backup()
  • qdb_getdbsize()
  • qdb_getoption()
  • qdb_getresult()
  • qdb_setoption()
  • qdb_statement()
  • qdb_vacuum()

You typically call this function after one of the above functions fails. If the error occurred within the SQL library, the returned string is an SQLite error message. If the error occurred in the QDB system, the returned string is a POSIX errno message.

Returns:

A pointer to an unmodifiable string containing the error message from the last QDB operation, or an empty string if there is no error. If the database handle is invalid, the function returns a pointer to a string containing the POSIX “not connected” errno message.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes