cond data".
    ret = cursorp-&gt;put(&amp;key2, &amp;data3, 
            DB_KEYFIRST); // If duplicates are not allowed, record 
                          // is overwritten with new data. Otherwise, 
                          // the record is added to the beginning of 
                          // the duplicates list.
} catch(DbException &amp;e) {
        my_database.err(e.get_errno(), "Error!");
} catch(std::exception &amp;e) {
        my_database.errx("Error! %s", e.what());
}

// Cursors must be closed
