DBcursor->c_close

APIRef

#include <db.h>

int DBcursor->c_close(DBC *cursor);

Description

The DBcursor->c_close method discards the cursor.

It is possible for the DBcursor->c_close method to return DB_LOCK_DEADLOCK, signaling that any enclosing transaction should be aborted. If the application is already intending to abort the transaction, this error should be ignored, and the application should proceed.

After DBcursor->c_close has been called, regardless of its return, the cursor handle may not be used again.

The DBcursor->c_close method returns a non-zero error value on failure and 0 on success.

Errors

The DBcursor->c_close method may fail and return a non-zero error for the following conditions:

DB_LOCK_DEADLOCK
The operation was selected to resolve a deadlock.

EINVAL
An invalid flag value or parameter was specified.

The cursor was previously closed.

The DBcursor->c_close method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DBcursor->c_close method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.

Class

DBC

See Also

Database Cursors and Related Methods

APIRef

Copyright Sleepycat Software