Go to the previous, next section.

Removing records from the database.

To remove some data from the database:

ret = gdbm_delete(dbf, key);

The parameters are:

GDBM_FILE dbf
The pointer returned by gdbm_open.
datum key
The key data.

The ret value is -1 if the item is not present or the requester is a reader. The ret value is 0 if there was a successful delete.

gdbm_delete removes the keyed item and the key from the database dbf. The file on disk is updated to reflect the structure of the new database before returning from this function.

Go to the previous, next section.