;get(type_curs, &amp;key, &amp;data, DB_SET)) != 0)
    /* Error handling goes here */

/* Set up the cursor array */
carray[0] = color_curs;
carray[1] = make_curs;
carray[2] = type_curs;
carray[3] = NULL;

/* Create the join */
if ((ret = automotiveDB-&gt;join(automotiveDB, carray, &amp;join_curs, 0)) != 0)
    /* Error handling goes here */

/* Iterate using the join cursor */
while ((ret = join_curs-&gt;get(join_curs, &amp;key, &amp;data, 0)) == 0) {
    /* Do interesting things with the key and data */
