# Dbc.close |

`

###

    import com.sleepycat.db.*;

    public void close()
    	throws DbException;

# Description

The Dbc.close method discards the cursor.

It is possible for the Dbc.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.

Once Dbc.close has been called, regardless of its return, the cursor handle may not be used again.

The Dbc.close method throws an exception that encapsulates a non-zero error value on failure.

# Errors

If a fatal error occurs in Berkeley DB, the Dbc.close method will fail and throw a DbRunRecoveryException, at which point all subsequent database calls will fail in the same way.

In addition, if the operation was selected to resolve a deadlock, the Dbc.close method will fail and throw a DbDeadlockException exception.

In addition, the Dbc.close method may fail and throw an exception encapsulating a non-zero error for the following conditions:

In addition, the Dbc.close method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods.

### Class

Dbc

# See Also

Dbc.close, Dbc.del, Dbc.dup, Dbc.get and Dbc.put.`

Copyright Sleepycat Software