DB_ENV->set_errpfx API Ref

#include <db.h>

void DB_ENV->set_errpfx(DB_ENV *dbenv, const char *errpfx);

void DB_ENV->get_errpfx(DB_ENV *dbenv, const char **errpfxp);


Description: DB_ENV->set_errpfx

Set the prefix string that appears before error messages issued by Berkeley DB.

The DB->set_errpfx and DB_ENV->set_errpfx methods do not copy the memory to which the errpfx parameter refers; rather, they maintain a reference to it. Although this allows applications to modify the error message prefix at any time (without repeatedly calling the interfaces), it means the memory must be maintained until the handle is closed.

The DB_ENV->set_errpfx method configures operations performed using the specified DB_ENV handle, not all operations performed on the underlying database environment.

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

Parameters
errpfx

Description: DB_ENV->get_errpfx

The DB_ENV->get_errpfx method returns the error prefix.

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

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

Parameters
errpfxp


Class DB_ENV
See Also Database Environments and Related Methods

APIRef

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