2010/1/16 Mike Johnston <[email protected]>:
> Using sqlite 3.6.22.  Here's my sql
> SELECT sno, lname, fname FROM addressbook where sno>?
> Suppose your stepping through a 100 row result set.  I'm calling 
> sqlite3_step(), getting my values all good.  If I were to call 
> sqlite3_bind_int() function with a new value for my where clause at row 50, 
> does that cause the step to re-execute the entire SQL?  Do I have to do a 
> reset, bind, step sequence ?

>From http://www.sqlite.org/c3ref/bind_blob.html:
"If any of the sqlite3_bind_*() routines are called with a NULL
pointer for the prepared statement or with a prepared statement for
which sqlite3_step() has been called more recently than
sqlite3_reset(), then the call will return SQLITE_MISUSE. If any
sqlite3_bind_() routine is passed a prepared statement that has been
finalized, the result is undefined and probably harmful."

In your scenario above you should get a SQLITE_MISUSE error.

> When does sqlite3_step() evaluate the bound values in the where clause?
> Thank you,Mike
>

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

Reply via email to