Library Version 11.2.5.2

DB->get_dbname()
Prev | Chapter 2. The DB Handle | Next

## DB->get_dbname()

    #include <db.h>

    int
    DB->get_dbname(DB *db, 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 returns a non-zero error value on failure and 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()