Berkeley DB Reference Version 5.3.33

DB->set_flags()

#include <db.h>

int
DB->set_flags(DB *db, u_int32_t flags);  

Configure a database. Calling DB->set_flags() is additive; there is no way to clear flags.

The DB->set_flags() method may not be called after the DB->open() method is called.

The DB->set_flags() method returns a non-zero error value on failure and 0 on success.

Parameters

flags

The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:

General

The following flags may be specified for any Berkeley DB access method:

Btree

The following flags may be specified for the Btree access method:

Hash

The following flags may be specified for the Hash access method:

Queue

The following flags may be specified for the Queue access method:

Recno

The following flags may be specified for the Recno access method:

Errors

The DB->set_flags() method may fail and return one of the following non-zero errors:

EINVAL

An invalid flag value or parameter was specified.

Class

DB

See Also

Database and Related Methods