e_curs = NULL;
type_curs = NULL;
join_curs = NULL;

memset(&amp;key, 0, sizeof(DBT));
memset(&amp;data, 0, sizeof(DBT));

/* open the cursors */
if (( ret =
    automotiveColorDB-&gt;cursor(automotiveColorDB, NULL, 
      &amp;color_curs, 0)) != 0) {
        /* Error handling goes here */
}

if (( ret =
    automotiveMakeDB-&gt;cursor(automotiveMakeDB, NULL, 
      &amp;make_curs, 0)) != 0) {
        /* Error handling goes here */
}

if (( ret =
    automotiveTypeDB-&gt;cursor(automotiveTypeDB, NULL, 
     