Library Version 18.1.25

DbSequence::set_range()
Prev | Chapter 12. The DbSequence Handle | Next

## DbSequence::set_range()

    #include <db_cxx.h>

    int
    DbSequence::set_range(db_seq_t min, db_seq_t max);

Configure a sequence range. This call is only effective when the sequence is being created. The range is limited to a signed 64 bit integer.

The `DbSequence::set_range()` method may not be called after the DbSequence::open() method is called.

The `DbSequence::set_range()` 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

#### min

Specifies the minimum value for the sequence.

#### max

Specifies the maximum value for the sequence.

### Errors

The `DbSequence::set_range()` method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

#### EINVAL

An invalid flag value or parameter was specified.

### Class

DbSequence

### See Also

Sequences and Related Methods

Prev | Up | Next
DbSequence::set_flags() | Home | DbSequence::stat()