On Fri, Aug 2, 2013 at 12:22 AM, <ngsbioinformat...@gmail.com> wrote:

> Hi all - I've got sqlite embedded in an iOS app.  I have a database with 1
> table, and am creating a prepared select statement with a where clause on 1
> field.  In my loop, my order of operations is: sqlite3_bind_text,
> sqlite3_step, sqlite3_reset.
>
> One the first iteration of the loop, sqlite3_step returns SQLITE_ROW and
> all the correct values.  On the second and every subsequent iteration,
> sqlite3_step returns SQLITE_DONE.  Why is this?


That means that the second and subsequent iterations found no rows.



>  I thought I could call
> sqlite3_reset then rebind a variable and called step again. All the
> documentation points to this being correct.
>

That is correct.  Maybe your rebound values are such that the query is
returning no rows?


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to