On Jun 22, 2009, at 6:10 PM, João Eiras wrote:

> Hello!
>
> I developing an single threaded app (pre-established fact, can't
> change this), and to keep the UI usable, when sqlite is executing,
> between multiple calls to sqlite3_step, I just break away and let the
> main message loop run a bit more. If the query i executing has an
> "order by" clause, then sqlite3_step will not return until it has
> processed the entire result set in memory, so it can be sorted.
>
> My doubt is the following: if from the progress callback (set with
> sqlite3_progress_handler) I return non 0 and therefore I get
> SQLITE_INTERRUPT from the call to sqlite3_step, is the sqlite3_stmt
> object still in a valid state and will the query resume normally if I
> pass the same sqlite3_stmt object back to sqlite3_step again ?

No. Next call on the statement handle should be sqlite3_reset() or
sqlite3_finalize().

Dan.


> This
> way I could try to interrupt the statement many times so I can
> continue to process the main loop to get the UI going.
>
> Thanks.
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to