Library Version 18.1.40

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

## DB->slice_lookup()

    #include <db.h>

    DB->slice_lookup(DB *db, const DBT *key, DB **result,
                     u_int32_t flags);

The `DB->slice_lookup()` method returns the subordinate database that contains the records for the provided key.

The `DB->slice_lookup()` method must be called on an opened database handle.

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

### Parameters

#### key

The key parameter is the DBT for the record that you want to look up.

#### result

The subordinate database containing the record identified by key is returned in the result parameter.

#### flags

The flags parameter is currently unused, and must be set to 0.

### Class

DB

### See Also

Database and Related Methods

Prev | Up | Next
DB->set_slice_callback() | Home | DB->sort_multiple()