</span>
    </p>
      <p>For example:</p>
      <a id="c_cursor8"></a>
      <pre class="programlisting">#include &lt;db.h&gt;
#include &lt;string.h&gt;

...

DB *dbp;
DBC *cursorp;
DBT key, data;
char *key1str = "My first string";
int ret;

/* Database open omitted */

/* Initialize our DBTs. */
memset(&amp;key, 0, sizeof(DBT));
memset(&amp;data, 0, sizeof(DBT));

/* Set up our DBTs */
key.data = key1str;
key.size = strlen(key1str) + 1;

/* Get the cursor */
dbp-&gt;cursor(dbp, NULL, &amp;cursorp, 0);

/*