www.delorie.com/gnu/docs/gdbm/gdbm_8.html   search  
 
Buy GNU books!


gdbm

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8. 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.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003