| 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>DB_TXN->set_name()</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 API Reference" /> |
| 10 | <link rel="up" href="txn.html" title="Chapter 12. The DB_TXN Handle" /> |
| 11 | <link rel="prev" href="txnprepare.html" title="DB_TXN->prepare()" /> |
| 12 | <link rel="next" href="txnset_priority.html" title="DB_TXN->set_priority()" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">DB_TXN->set_name()</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="txnprepare.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 12. |
| 26 | The DB_TXN Handle |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="txnset_priority.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="txnset_name"></a>DB_TXN->set_name()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db.h> |
| 42 | |
| 43 | int |
| 44 | DB_TXN->set_name(DB_TXN *txn, const char *name); </pre> |
| 45 | <p> |
| 46 | The <code class="methodname">DB_TXN->set_name()</code> method associates the specified string with |
| 47 | the transaction. The string is returned by |
| 48 | <a class="xref" href="txnstat.html" title="DB_ENV->txn_stat()">DB_ENV->txn_stat()</a> and displayed |
| 49 | by <a class="xref" href="txnstat_print.html" title="DB_ENV->txn_stat_print()">DB_ENV->txn_stat_print()</a>. |
| 50 | </p> |
| 51 | <p> |
| 52 | If the database environment has been configured for logging and the |
| 53 | Berkeley DB library was configured with |
| 54 | <a href="../../installation/build_unix_conf.html" class="olink">--enable-diagnostic</a>, |
| 55 | a debugging log record is written including the transaction ID and the |
| 56 | name. |
| 57 | </p> |
| 58 | <p> |
| 59 | The <code class="methodname">DB_TXN->set_name()</code> method may be called at any time during the |
| 60 | life of the application. |
| 61 | </p> |
| 62 | <p> |
| 63 | The <code class="methodname">DB_TXN->set_name()</code> <span> |
| 64 | <span> |
| 65 | method returns a non-zero error value on failure and 0 on success. |
| 66 | </span> |
| 67 | |
| 68 | </span> |
| 69 | </p> |
| 70 | <div class="sect2" lang="en" xml:lang="en"> |
| 71 | <div class="titlepage"> |
| 72 | <div> |
| 73 | <div> |
| 74 | <h3 class="title"><a id="idp54995536"></a>Parameters</h3> |
| 75 | </div> |
| 76 | </div> |
| 77 | </div> |
| 78 | <div class="sect3" lang="en" xml:lang="en"> |
| 79 | <div class="titlepage"> |
| 80 | <div> |
| 81 | <div> |
| 82 | <h4 class="title"><a id="idp54994888"></a>name</h4> |
| 83 | </div> |
| 84 | </div> |
| 85 | </div> |
| 86 | <p> |
| 87 | The <span class="bold"><strong>name</strong></span> parameter is the string to |
| 88 | associate with the transaction. |
| 89 | </p> |
| 90 | </div> |
| 91 | </div> |
| 92 | <div class="sect2" lang="en" xml:lang="en"> |
| 93 | <div class="titlepage"> |
| 94 | <div> |
| 95 | <div> |
| 96 | <h3 class="title"><a id="idp54985024"></a>Class</h3> |
| 97 | </div> |
| 98 | </div> |
| 99 | </div> |
| 100 | <p> |
| 101 | <a class="link" href="env.html" title="Chapter 5. The DB_ENV Handle">DB_ENV</a>, <a class="link" href="txn.html" title="Chapter 12. The DB_TXN Handle">DB_TXN</a> |
| 102 | </p> |
| 103 | </div> |
| 104 | <div class="sect2" lang="en" xml:lang="en"> |
| 105 | <div class="titlepage"> |
| 106 | <div> |
| 107 | <div> |
| 108 | <h3 class="title"><a id="idp54988752"></a>See Also</h3> |
| 109 | </div> |
| 110 | </div> |
| 111 | </div> |
| 112 | <p> |
| 113 | <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a> |
| 114 | </p> |
| 115 | </div> |
| 116 | </div> |
| 117 | <div class="navfooter"> |
| 118 | <hr /> |
| 119 | <table width="100%" summary="Navigation footer"> |
| 120 | <tr> |
| 121 | <td width="40%" align="left"><a accesskey="p" href="txnprepare.html">Prev</a> </td> |
| 122 | <td width="20%" align="center"> |
| 123 | <a accesskey="u" href="txn.html">Up</a> |
| 124 | </td> |
| 125 | <td width="40%" align="right"> <a accesskey="n" href="txnset_priority.html">Next</a></td> |
| 126 | </tr> |
| 127 | <tr> |
| 128 | <td width="40%" align="left" valign="top">DB_TXN->prepare() </td> |
| 129 | <td width="20%" align="center"> |
| 130 | <a accesskey="h" href="index.html">Home</a> |
| 131 | </td> |
| 132 | <td width="40%" align="right" valign="top"> DB_TXN->set_priority()</td> |
| 133 | </tr> |
| 134 | </table> |
| 135 | </div> |
| 136 | </body> |
| 137 | </html> |