Sam Carleton <scarle...@miltonstreet.com> wrote: > On Fri, Apr 22, 2011 at 11:44 PM, Drake Wilson <dr...@begriffli.ch> wrote: > >> You probably need to sqlite3_reset the statement after stepping it. > > Can someone then explain the purpose of sqlite3_clear_bindings()?
sqlite3_reset preserves previous bindings. sqlite3_clear_bindings resets all bound parameters to their default value of NULL, if for some reason you want to do that. > If > I understand things correctly, you call sqlite3_reset() to reuse a > prepaired statement, why do you call sqlite3_clear_bindings()? You don't have to. Personally, I've never once found a use for it. > Is it > because sqlite3_reset() does not actually clear the binding values, > just resets the preparied statement? That's correct. > Why doesn't reset also clear the binding? In case you want to run the statement several times varying some, but not all, parameters. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users