<!--$Id: txn_abort.so,v 10.38 2003/09/25 15:28:13 bostic Exp $--> <!--Copyright 1997-2003 by Sleepycat Software, Inc.--> <!--All rights reserved.--> <!--See the file LICENSE for redistribution information.--> <html> <head> <title>Berkeley DB: DbTxn::abort</title> <meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> <meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> </head> <body bgcolor=white> <a name="2"><!--meow--></a> <table width="100%"><tr valign=top> <td> <h3>DbTxn::abort</h3> </td> <td align=right> <a href="../../db42-devel-4.2.52/api_cxx/api_index.html"><img src="../../db42-4.2.52/images/api.gif" alt="API"></a> <a href="../../db42-devel-4.2.52/ref/toc.html"><img src="../../db42-4.2.52/images/ref.gif" alt="Ref"></a> </td></tr></table> <hr size=1 noshade> <tt> <h3><pre> #include <db_cxx.h> <p> int DbTxn::abort(); </pre></h3> <hr size=1 noshade> <h3>Description: DbTxn::abort</h3> <p>The DbTxn::abort method causes an abnormal termination of the transaction. The log is played backward, and any necessary undo operations are done through the <b>tx_recover</b> function specified to <a href="../../db42-devel-4.2.52/api_cxx/env_set_app_dispatch.html">DbEnv::set_app_dispatch</a>. Before DbTxn::abort returns, any locks held by the transaction will have been released.</p> <p>In the case of nested transactions, aborting a parent transaction causes all children (unresolved or not) of the parent transaction to be aborted.</p> <p>All cursors opened within the transaction must be closed before the transaction is aborted.</p> <p>After DbTxn::abort has been called, regardless of its return, the <a href="../../db42-devel-4.2.52/api_cxx/txn_class.html">DbTxn</a> handle may not be accessed again.</p> <p>The DbTxn::abort method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success. </p> <hr size=1 noshade> <h3>Class</h3> <a href="../../db42-devel-4.2.52/api_cxx/env_class.html">DbEnv</a>, <a href="../../db42-devel-4.2.52/api_cxx/txn_class.html">DbTxn</a> <h3>See Also</h3> <a href="../../db42-devel-4.2.52/api_cxx/txn_list.html">Transaction Subsystem and Related Methods</a> </tt> <table width="100%"><tr><td><br></td><td align=right> <a href="../../db42-devel-4.2.52/api_cxx/api_index.html"><img src="../../db42-4.2.52/images/api.gif" alt="API"></a><a href="../../db42-devel-4.2.52/ref/toc.html"><img src="../../db42-4.2.52/images/ref.gif" alt="Ref"></a> </td></tr></table> <p><font size=1><a href="../../db42-devel-4.2.52/sleepycat/legal.html">Copyright (c) 1996-2003</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font> </body> </html>