Storing Records with a Cursor
The DBcursor→c_put function is the standard interface for storing records into the database with a cursor. In general, DBcursor→c_put takes a key and inserts the associated data into the database at a location controlled by a specified flag.
There are several flags that you can set to customize storage:
DB_AFTER Create a new record immediately after the record currently referenced by the cursor.
DB_BEFORE Create a new record immediately before the record currently referenced by the cursor.
DB_CURRENT_PUT Replace the data part of the record currently referenced by the cursor.
DB_KEYFIRST Create a new record as the first of the duplicate records for the supplied key.
DB_KEYLAST Create a new record as the last of ...