dbm_error() — Check database error indicator
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both |
Format
#define _XOPEN_SOURCE_EXTENDED 1
#include <ndbm.h>
int dbm_error(DBM *db);
General description
The dbm_error() function returns the error condition of the database. The argument db is a handle to a database previously obtained by dbm_open().
Special behavior for z/OS® UNIX Services: In a multithreaded environment, the database error indicator is global to all threads using the database handle. Thus, the database error indicator may be set as a result of a database operation by another thread.
Returned value
dbm_error() returns 0 if the error condition is not set.
dbm_error() returns nonzero if the error condition is set.
Related information
- ndbm.h
- dbm_clearerr() — Clear database error indicator
- dbm_close() — Close a database
- dbm_delete() — Delete database record
- dbm_fetch() — Get database content
- dbm_firstkey() — Get first key in database
- dbm_nextkey() — Get next key in database
- dbm_open() — Open a database
- dbm_store() — Store database record