DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

DBcursor->c_close

API Ref

#include <db.h>

int DBcursor->c_close(DBC *DBcursor);


Description: DBcursor->c_close

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 one of the following non-zero errors:

DB_LOCK_DEADLOCK
A transactional database environment operation was selected to resolve a deadlock.
DB_LOCK_NOTGRANTED
A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable to grant a lock in the allowed time.
EINVAL
If the cursor is already closed; or if an invalid flag value or parameter was specified.

Class

DBC

See Also

Database Cursors and Related Methods

APIRef

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