# Db.set_append_recno |

`

###

    import com.sleepycat.db.*;

    public interface DbAppendRecno
    {
    	public abstract void db_append_recno(Db db, Dbt data, int recno);
    		throws DbException;
    }
    public class Db
    {
    	public void set_append_recno(DbAppendRecno db_append_recno)
    		throws DbException;
    	...
    }

# Description

When using the Db.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 method 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 callback function must throw a DbException object to encapsulate the error on failure. That object will be thrown to caller of Db.put.

The called function must take three arguments: a reference to the enclosing database handle; the data Dbt to be stored; and the selected record number. The called function may then modify the data Dbt.

The Db.set_append_recno interface may be used only to configure Berkeley DB before the Db.open interface is called.

The Db.set_append_recno method throws an exception that encapsulates a non-zero error value on failure.

# Class

DbEnv

# See Also

DbEnv.close, DbEnv.get_version_string, DbEnv.open, DbEnv.remove, DbEnv.set_cachesize, DbEnv.set_data_dir, DbEnv.set_errcall, DbEnv.set_error_stream, DbEnv.set_errpfx, DbEnv.set_feedback, DbEnv.set_flags, DbEnv.set_mutexlocks, DbEnv.set_pageyield, DbEnv.set_panicstate, DbEnv.set_recovery_init, DbEnv.set_rpc_server, DbEnv.set_region_init, DbEnv.set_shm_key, DbEnv.set_tas_spins, DbEnv.set_tmp_dir, DbEnv.set_verbose, and DbEnv.strerror.`

Copyright Sleepycat Software