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>dbc dup</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 TCL API Reference" /> 10 <link rel="up" href="tclapi.html" title="Chapter��1.�� Berkeley DB Tcl APIs" /> 11 <link rel="prev" href="dbc_del.html" title="dbc del" /> 12 <link rel="next" href="dbc_get.html" title="dbc get" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center"><span class="emphasis"><em>dbc</em></span> dup</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="dbc_del.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��1.�� 23 Berkeley DB Tcl APIs 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="dbc_get.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="dbc_dup"></a><span class="emphasis"><em>dbc</em></span> dup</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">dbc dup 39 [-position] </pre> 40 <p> 41 The <span class="emphasis"><em>dbc</em></span> <span class="bold"><strong>dup</strong></span> 42 command duplicates the cursor, creates a new cursor that uses the same 43 transaction and locker ID as the original cursor. This is useful when 44 an application is using locking and requires two or more cursors in 45 the same thread of control. 46 </p> 47 <p> 48 The options are as follows: 49 </p> 50 <div class="itemizedlist"> 51 <ul type="disc"> 52 <li> 53 <p> 54 <span class="bold"><strong>-position</strong></span> 55 </p> 56 <p> 57 The newly created cursor is initialized to refer to the same position 58 in the database as the original cursor and hold the same locks. If the 59 <span class="bold"><strong>-position</strong></span> flag is not specified, the 60 created cursor is uninitialized and will behave like a cursor newly 61 created using the <span class="emphasis"><em>db</em></span> <span class="bold"><strong>cursor</strong></span> command. 62 </p> 63 </li> 64 </ul> 65 </div> 66 <p> 67 The <span class="emphasis"><em>dbc</em></span> <span class="bold"><strong>dup</strong></span> 68 command returns 0 on success, and in the case of error, a Tcl error is 69 thrown. 70 </p> 71 </div> 72 <div class="navfooter"> 73 <hr /> 74 <table width="100%" summary="Navigation footer"> 75 <tr> 76 <td width="40%" align="left"><a accesskey="p" href="dbc_del.html">Prev</a>��</td> 77 <td width="20%" align="center"> 78 <a accesskey="u" href="tclapi.html">Up</a> 79 </td> 80 <td width="40%" align="right">��<a accesskey="n" href="dbc_get.html">Next</a></td> 81 </tr> 82 <tr> 83 <td width="40%" align="left" valign="top"><span class="emphasis"><em>dbc</em></span> del��</td> 84 <td width="20%" align="center"> 85 <a accesskey="h" href="index.html">Home</a> 86 </td> 87 <td width="40%" align="right" valign="top">��<span class="emphasis"><em>dbc</em></span> get</td> 88 </tr> 89 </table> 90 </div> 91 </body> 92</html> 93