Library Version 12.1.6.0

Db::get_dbname()
Prev | Chapter 2. The Db Handle | Next

## Db::get_dbname()

    #include <db_cxx.h>

    int
    Db::get_dbname(const char **filenamep, const char **dbnamep);

The `Db::get_dbname()` method returns the filename and database name used by the Db handle.

The `Db::get_dbname()` 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

#### filenamep

The filenamep parameter references memory into which a pointer to the current filename is copied.

#### dbnamep

The dbnamep parameter references memory into which a pointer to the current database name is copied.

### Class

Db

### See Also

Database and Related Methods

Prev | Up | Next
Db::get_create_dir() | Home | Db::get_encrypt_flags()