dbm_fetch()

read record from database 

Function


SYNOPSIS

#include <ndbm.h>

datum dbm_fetch(DBM *db, datum key);


DESCRIPTION

The dbm_fetch() function reads a record from the database specified by db. The argument key is a datum that has been initialized by the application program to the value of the key that identifies the record to be deleted.

A datum consists of at least two members, dptr and dsize. The dptr member points to an object that is dsize bytes in length. Arbitrary binary data, as well as character strings, may be stored in the object pointed to by dptr.


PARAMETERS

db 

Points to the database where the record is fetched from. This must be a pointer returned by a prior call to dbm_open().

key 

Is the key for the record to be fetched.


RETURN VALUES

The dbm_fetch() function returns a content datum. If no record in the database matches the key, or if an error condition has been detected in the database, the dptr member of the content is a null pointer.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

Unsafe.


PORTING ISSUES

None


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
dbm_clearerr(), dbm_close(), dbm_delete(), dbm_error(), dbm_firstkey(), dbm_nextkey(), dbm_open(), dbm_store(), dbopen()


PTC MKS Toolkit 10.3 Documentation Build 39.