Library Version 11.2.5.2

DB_SEQUENCE->remove()
Prev | Chapter 11. The DB_SEQUENCE Handle | Next

## DB_SEQUENCE->remove()

    #include <db.h>

    int
    DB_SEQUENCE->remove(DB_SEQUENCE *seq, DB_TXN *txnid, u_int32_t flags);

The `DB_SEQUENCE->remove()` method removes the sequence from the database. This method should not be called if there are other open handles on this sequence.

The DB_SEQUENCE handle may not be accessed again after `DB_SEQUENCE->remove()` is called, regardless of its return.

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

### Parameters

#### txnid

If the operation is part of an application-specified transaction, the txnid parameter is a transaction handle returned from DB_ENV->txn_begin(); if the operation is part of a Berkeley DB Concurrent Data Store group, the txnid parameter is a handle returned from DB_ENV->cdsgroup_begin(); otherwise NULL. If no transaction handle is specified, but the operation occurs in a transactional database, the operation will be implicitly transaction protected.

#### flags

The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:

- `DB_TXN_NOSYNC`

  If the operation is implicitly transaction protected (the txnid argument is NULL but the operation occurs to a transactional database), do not synchronously flush the log when the transaction commits.

### Errors

The `DB_SEQUENCE->remove()` method may fail and return one of the following non-zero errors:

#### EINVAL

An invalid flag value or parameter was specified.

### Class

DB_SEQUENCE

### See Also

Sequences and Related Methods

Prev | Up | Next
DB_SEQUENCE->open() | Home | DB_SEQUENCE->set_cachesize()