1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>set_current_txn_handle</title> 7 <link rel="stylesheet" href="apiReference.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" /> 10 <link rel="up" href="dbstl_global_functions.html" title="Chapter 1. Dbstl Global Public Functions" /> 11 <link rel="prev" href="stldbstl_global_functionscurrent_txn.html" title="current_txn" /> 12 <link rel="next" href="stldbstl_global_functionsregister_db.html" title="register_db" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center"> 19set_current_txn_handle 20</th> 21 </tr> 22 <tr> 23 <td width="20%" align="left"><a accesskey="p" href="stldbstl_global_functionscurrent_txn.html">Prev</a> </td> 24 <th width="60%" align="center">Chapter 1. 25 Dbstl Global Public Functions </th> 26 <td width="20%" align="right"> <a accesskey="n" href="stldbstl_global_functionsregister_db.html">Next</a></td> 27 </tr> 28 </table> 29 <hr /> 30 </div> 31 <div class="sect1" lang="en" xml:lang="en"> 32 <div class="titlepage"> 33 <div> 34 <div> 35 <h2 class="title" style="clear: both"><a id="stldbstl_global_functionsset_current_txn_handle"></a> 36set_current_txn_handle 37</h2> 38 </div> 39 </div> 40 </div> 41 <div class="sect2" lang="en" xml:lang="en"> 42 <div class="titlepage"> 43 <div> 44 <div> 45 <h3 class="title"><a id="func_details"></a> 46Function Details</h3> 47 </div> 48 </div> 49 </div> 50 <pre class="programlisting"> 51 DbTxn* set_current_txn_handle(DbEnv *env, 52 DbTxn *newtxn) 53 </pre> 54 <div class="sect3" lang="en" xml:lang="en"> 55 <div class="titlepage"></div> 56 <p>Set environment env's current transaction handle to be newtxn. </p> 57 <p>The original transaction handle returned without aborting or commiting. This function is used for users to use one transaction among multiple threads. </p> 58 </div> 59 <div class="sect3" lang="en" xml:lang="en"> 60 <div class="titlepage"> 61 <div> 62 <div> 63 <h4 class="title"><a id="id1542422"></a> 64Parameters</h4> 65 </div> 66 </div> 67 </div> 68 <div class="sect4" lang="en" xml:lang="en"> 69 <div class="titlepage"> 70 <div> 71 <div> 72 <h5 class="title"><a id="id1542771"></a> 73 newtxn </h5> 74 </div> 75 </div> 76 </div> 77 <p>The new transaction to be as the current transaction of env. </p> 78 </div> 79 <div class="sect4" lang="en" xml:lang="en"> 80 <div class="titlepage"> 81 <div> 82 <div> 83 <h5 class="title"><a id="id1542654"></a> 84 env </h5> 85 </div> 86 </div> 87 </div> 88 <p>The environment whose current transaction to replace. </p> 89 </div> 90 </div> 91 <div class="sect3" lang="en" xml:lang="en"> 92 <div class="titlepage"> 93 <div> 94 <div> 95 <h4 class="title"><a id="id1542172"></a> 96Return Value</h4> 97 </div> 98 </div> 99 </div> 100 <p>The old current transaction of env. It is not resolved. </p> 101 </div> 102 </div> 103 <div class="sect2" lang="en" xml:lang="en"> 104 <div class="titlepage"> 105 <div> 106 <div> 107 <h3 class="title"><a id="id1542817"></a> 108Group: Transaction control global functions.</h3> 109 </div> 110 </div> 111 </div> 112 <p>dbstl transaction API.</p> 113 <p>You should call these API rather than DB C/C++ API to use Berkeley DB transaction features. </p> 114 </div> 115 <div class="sect2" lang="en" xml:lang="en"> 116 <div class="titlepage"> 117 <div> 118 <div> 119 <h3 class="title"><a id="id1542885"></a> 120Class</h3> 121 </div> 122 </div> 123 </div> 124 <p> 125 <a class="link" href="dbstl_global_functions.html" title="Chapter 1. Dbstl Global Public Functions"> 126 dbstl_global_functions</a> 127 </p> 128 </div> 129 </div> 130 <div class="navfooter"> 131 <hr /> 132 <table width="100%" summary="Navigation footer"> 133 <tr> 134 <td width="40%" align="left"><a accesskey="p" href="stldbstl_global_functionscurrent_txn.html">Prev</a> </td> 135 <td width="20%" align="center"> 136 <a accesskey="u" href="dbstl_global_functions.html">Up</a> 137 </td> 138 <td width="40%" align="right"> <a accesskey="n" href="stldbstl_global_functionsregister_db.html">Next</a></td> 139 </tr> 140 <tr> 141 <td width="40%" align="left" valign="top"> 142current_txn 143 </td> 144 <td width="20%" align="center"> 145 <a accesskey="h" href="index.html">Home</a> 146 </td> 147 <td width="40%" align="right" valign="top"> 148register_db 149</td> 150 </tr> 151 </table> 152 </div> 153 </body> 154</html> 155