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 cursor</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="db_count.html" title="db count" /> 12 <link rel="next" href="db_del.html" title="db del" /> 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>db</em></span> cursor</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="db_count.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="db_del.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="db_cursor"></a><span class="emphasis"><em>db</em></span> cursor</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">db cursor 39 [-txn txnid] </pre> 40 <p> 41 The <span class="emphasis"><em>db</em></span> <span class="bold"><strong>cursor</strong></span> 42 command creates a database cursor. The returned cursor handle is 43 bound to a Tcl command of the form <span class="bold"><strong>dbN.cX</strong></span>, where X is an integer starting at 0 44 (for example, db0.c0 and db0.c1). It is through this Tcl command that 45 the script accesses the cursor methods. 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>-txn txnid</strong></span> 55 </p> 56 <p> 57 If the operation is part of an application-specified transaction, the 58 <span class="bold"><strong>txnid</strong></span> parameter is a transaction 59 handle returned from <span class="emphasis"><em>env</em></span> <span class="bold"><strong>txn</strong></span>. If no transaction handle is specified, 60 but the operation occurs in a transactional database, the operation 61 will be implicitly transaction protected. 62 </p> 63 </li> 64 </ul> 65 </div> 66 <p> 67 In the case of error, a Tcl error is thrown. 68 </p> 69 </div> 70 <div class="navfooter"> 71 <hr /> 72 <table width="100%" summary="Navigation footer"> 73 <tr> 74 <td width="40%" align="left"><a accesskey="p" href="db_count.html">Prev</a> </td> 75 <td width="20%" align="center"> 76 <a accesskey="u" href="tclapi.html">Up</a> 77 </td> 78 <td width="40%" align="right"> <a accesskey="n" href="db_del.html">Next</a></td> 79 </tr> 80 <tr> 81 <td width="40%" align="left" valign="top"><span class="emphasis"><em>db</em></span> count </td> 82 <td width="20%" align="center"> 83 <a accesskey="h" href="index.html">Home</a> 84 </td> 85 <td width="40%" align="right" valign="top"> <span class="emphasis"><em>db</em></span> del</td> 86 </tr> 87 </table> 88 </div> 89 </body> 90</html> 91