1<!--$Id: dbc_close.so,v 10.35 2006/10/24 13:26:50 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: DBcursor->close</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>DBcursor->close</b> 14</td> 15<td align=right> 16<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a> 17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db.h> 23<p> 24int 25DBcursor->close(DBC *DBcursor); 26</pre></b> 27<hr size=1 noshade> 28<b>Description: DBcursor->close</b> 29<p>The DBcursor->close method discards the cursor.</p> 30<p>It is possible for the DBcursor->close method to return 31<a href="../ref/program/errorret.html#DB_LOCK_DEADLOCK">DB_LOCK_DEADLOCK</a>, signaling that any enclosing transaction should 32be aborted. If the application is already intending to abort the 33transaction, this error should be ignored, and the application should 34proceed.</p> 35<p>After DBcursor->close has been called, regardless of its return, the 36cursor handle may not be used again.</p> 37<p>The DBcursor->close method 38returns a non-zero error value on failure 39and 0 on success. 40</p> 41<br><b>Errors</b> 42<p>The DBcursor->close method 43may fail and return one of the following non-zero errors:</p> 44<br> 45<b>DB_LOCK_DEADLOCK</b><ul compact><li>A transactional database environment operation was selected to resolve 46a deadlock.</ul> 47<b>DB_LOCK_NOTGRANTED</b><ul compact><li>A Berkeley DB Concurrent Data Store database environment configured for lock timeouts was unable 48to grant a lock in the allowed time.</ul> 49<br> 50<br> 51<b>EINVAL</b><ul compact><li>If the cursor is already closed; or if an 52invalid flag value or parameter was specified.</ul> 53<br> 54<hr size=1 noshade> 55<br><b>Class</b> 56<a href="../api_c/dbc_class.html">DBC</a> 57<br><b>See Also</b> 58<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a> 59</tt> 60<table width="100%"><tr><td><br></td><td align=right> 61<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a> 62</td></tr></table> 63<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 64</body> 65</html> 66