sqlite3_errcode() — Get error code for last failed API call
int sqlite3_errcode( sqlite3* db );
A database connection.
An error code or extended error code.
This function returns the error code from the last failed
sqlite3_* API call
associated with this database connection. If extended error
codes are enabled, this function may also return an extended
error code. If a failed call was followed by a successful call,
the results are undefined.
If the SQLite library is in “serialized” threading mode, there
is a risk of a race condition between threads. To avoid
problems, the current thread should use
sqlite3_mutex_enter() to acquire exclusive
access to the database connection before the initial API call is
made. The thread can release the mutex after
sqlite3_errcode() is called. In
“multi-thread” mode, it is the responsibility of the application
to control access to the database connection.
If an API call returns
SQLITE_MISUSE, it indicates an application
error. In that case, the result code may or may not be available