Library Version 12.1.6.2

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

## Db::slice_lookup()

    #include <db_cxx.h>

    Db->slice_lookup(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 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

#### 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()