--- dbdimp.c.orig 2008-03-18 17:37:18.580463431 -0700 +++ dbdimp.c 2008-03-18 17:39:04.320466041 -0700 @@ -399,7 +399,7 @@ continue; } /* There are bug reports that say this should be sqlite3_reset() */ - sqlite3_finalize(imp_sth->stmt); + sqlite3_reset(imp_sth->stmt); sqlite_error(sth, (imp_xxh_t*)imp_sth, imp_sth->retval, (char*)sqlite3_errmsg(imp_dbh->db)); return -5; } @@ -419,7 +419,7 @@ sqlite_trace(5, "exec ok - %d rows, %d cols\n", imp_sth->nrow, DBIc_NUM_FIELDS(imp_sth)); return 0; /* There are bug reports that say this should be sqlite3_reset() */ - default: sqlite3_finalize(imp_sth->stmt); + default: sqlite3_reset(imp_sth->stmt); sqlite_error(sth, (imp_xxh_t*)imp_sth, imp_sth->retval, (char*)sqlite3_errmsg(imp_dbh->db)); return -6; }