DbEnv::set_flags API Ref

#include <db_cxx.h>

int DbEnv::set_flags(u_int32_t flags, int onoff);

int DbEnv::get_flags(u_int32_t *flagsp)


Description: DbEnv::set_flags

Configure a database environment.

The database environment's flag values may also be configured using the environment's DB_CONFIG file. The syntax of the entry in that file is a single line with the string "set_flags", one or more whitespace characters, and the method flag parameter as a string; for example, "set_flags DB_TXN_NOSYNC". Because the DB_CONFIG file is read when the database environment is opened, it will silently overrule configuration done before that time.

The DbEnv::set_flags 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
flags onoff

Errors

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


EINVAL

Description: DbEnv::get_flags

The DbEnv::get_flags method returns the configuration flags.

The DbEnv::get_flags method may be called at any time during the life of the application.

The DbEnv::get_flags 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
flagsp


Class DbEnv
See Also Database Environments and Related Methods

APIRef

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