Sorry, I misread the documentation. And do you recommend the strategy used in tclsqlite.c:
rcs = sqlite3_step(pStmt); if( rcs==SQLITE_ROW ){ return TCL_OK; } ... rcs = sqlite3_reset(pStmt); ... Reset the stmt as soon as possible after sqlite3_step (except on SQLITE_ROW) ? Thanks. On Fri, Jul 31, 2015 at 12:02 PM, Clemens Ladisch <clemens at ladisch.de> wrote: > Stephan Beal wrote: >> On Thu, Jul 30, 2015 at 11:35 PM, Clemens Ladisch <clemens at ladisch.de> >> wrote: >>> gwenn wrote: >>>> sqlite3_stmt_busy returns true after sqlite3_step returns DONE. >>> >>> The documentation says: >>> | The sqlite3_stmt_busy(S) interface returns true (non-zero) if the >>> | prepared statement S has been stepped at least once using >>> | sqlite3_step(S) but has not run to completion and/or has not been >>> | reset using sqlite3_reset(S). >>> >>> The statement has not been reset, and that "and/or" can be read as "or". >> >> Does that means that SQLITE_DONE does _not_ mean "has run to completion"? > > No. > > Let me rephrase that doc snippet: > "sqlite3_stmt_busy() returns true if A but not B and/or not C" (where > A = "stepped", B = "SQLITE_DONE", C = "reset"). > > I do not know if the "but not" and "and/or" operators use the SQL > precedence rules. :) But there exists a way of interpreting this > sentence that matches the actual behavuour. > > > Regards, > Clemens > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users