### DbSequence::set_flags |

`

###

    #include <db_cxx.h>

    int
    DbSequence::set_flags(u_int32_t flags);

    int DbSequence::get_flags(u_int32_t *flagsp);

### Description: DbSequence::set_flags

Configure a sequence. The flags are only effective when creating a sequence. Calling DbSequence::set_flags is additive; there is no way to clear flags.

The DbSequence::set_flags method may not be called after the DbSequence::open method is called.

The DbSequence::set_flags 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

flags
  The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
  DB_SEQ_DEC
    Specify that the sequence should be decremented.
  DB_SEQ_INC
    Specify that the sequence should be incremented. This is the default.
  DB_SEQ_WRAP
    Specify that the sequence should wrap around when it is incremented (decremented) past the specified maximum (minimum) value.

### Errors

The DbSequence::set_flags method may fail and throw DbException, 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.

### Description: DbSequence::get_flags

The DbSequence::get_flags method returns the current flags.

The DbSequence::get_flags method may be called at any time during the life of the application.

The DbSequence::get_flags 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

flagsp
  The DbSequence::get_flags method returns the current flags in flagsp.

### Class

DbSequence

### See Also

Sequences and Related Methods`

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.