DBcursor->c_close

APIRef

#include <db.h>

int DBcursor->c_close(DBC *cursor);

Description

The DBcursor->c_close function discards the cursor.

It is possible for the DBcursor->c_close function 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.

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

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

Errors

If a fatal error occurs in Berkeley DB, the DBcursor->c_close function will fail and return DB_RUNRECOVERY, at which point all subsequent database calls will fail in the same way.

In addition, the DBcursor->c_close function may fail and return a non-zero error for the following conditions:

DB_LOCK_DEADLOCK
The operation was selected to resolve a deadlock.

In addition, the DBcursor->c_close function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions.

See Also

DBcursor->c_close, DBcursor->c_del, DBcursor->c_dup, DBcursor->c_get and DBcursor->c_put.

APIRef

Copyright Sleepycat Software