manpagez: man pages & more
info gdbm
Home | html | info | man

File: gdbm.info,  Node: Delete,  Next: Sequential,  Prev: Fetch,  Up: Top

8 Removing records from the database
************************************

To remove some data from the database, use the 'gdbm_delete' function.

 -- gdbm interface: int gdbm_delete (GDBM_FILE DBF, datum KEY)
     Deletes the data associated with the given KEY, if it exists in the
     database DBF.

     The parameters are:

     DBF
          The pointer returned by 'gdbm_open'.
     DATUM KEY
          The search key.

     The function returns '-1' if the item is not present or if an error
     is encountered.  Examine the 'gdbm_errno' variable or the return
     from 'gdbm_last_errno (DBF)' to know the reason.

     The return of '0' marks a successful delete.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.