DB_ENV->open API Ref

#include <db.h>

int DB_ENV->open(DB_ENV *dbenv, char *db_home, u_int32_t flags, int mode);

int DB_ENV->get_home(DB_ENV *dbenv, const char **homep);

int DB_ENV->get_open_flags(DB_ENV *dbenv, u_int32_t *flagsp);


Description: DB_ENV->open

The DB_ENV->open method opens a Berkeley DB environment. It provides a structure for creating a consistent environment for processes using one or more of the features of Berkeley DB.

The DB_ENV->open method returns a non-zero error value on failure and 0 on success. If DB_ENV->open fails, the DB_ENV->close method must be called to discard the DB_ENV handle.

Parameters
db_home

When using a Unicode build on Windows (the default), the db_home argument will be interpreted as a UTF-8 string, which is equivalent to ASCII for Latin characters.

flags mode

Errors

The DB_ENV->open method may fail and return one of the following non-zero errors:


DB_RUNRECOVERY

DB_VERSION_MISMATCH

EAGAIN

EINVAL

ENOSPC

ENOENT

Description: DB_ENV->get_home

The DB_ENV->get_home method returns the database environment home directory.

The DB_ENV->get_home method may be called at any time during the life of the application.


Description: DB_ENV->get_open_flags

The DB_ENV->get_open_flags method returns the open method flags originally used to create the database environment.

The DB_ENV->get_open_flags method may not be called before the DB_ENV->open method is called.

The DB_ENV->get_open_flags method returns a non-zero error value on failure and 0 on success.

Parameters
flagsp


Class DB_ENV
See Also Database Environments and Related Methods

APIRef

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