Db::set_append_recno API Ref

#include <db_cxx.h>

int Db::set_append_recno(int (*db_append_recno_fcn)(DB *dbp, Dbt *data, db_recno_t recno));


Description: Db::set_append_recno

When using the DB_APPEND option of the Db::put method, it may be useful to modify the stored data based on the generated key. If a callback function is specified using the Db::set_append_recno method, it will be called after the record number has been selected, but before the data has been stored.

The Db::set_append_recno method configures operations performed using the specified Db handle, not all operations performed on the underlying database.

The Db::set_append_recno method may not be called after the Db::open method is called.

The Db::set_append_recno method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

Parameters
db_append_recno_fcn

Errors

The Db::set_append_recno method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:


EINVAL


Class Db
See Also Databases and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.