t the txn handle */
    txn = NULL;
    ret = envp-&gt;txn_begin(envp, NULL, &amp;txn, 0);
    if (ret != 0) {
        envp-&gt;err(envp, ret, "Transaction begin failed.");
        goto err;
    }

    /* Get the cursor, supply the txn handle at that time */
    ret = dbp-&gt;cursor(dbp, txn, &amp;cursorp, 0);
    if (ret != 0) {
        envp-&gt;err(envp, ret, "Cursor open failed.");
        txn-&gt;abort(txn);
        goto err;
    }

    /* 
     * Now use the cursor. Note that we do not supply any txn h