int DBcursor->c_close(DBC *cursor);
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.
After 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.
The DBcursor->c_close function may fail and return a non-zero error for the following conditions:
The cursor was previously closed.
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. If a catastrophic error has occurred, the DBcursor->c_close function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.
Copyright Sleepycat Software