On Thu, Jan 15, 2009 at 1:52 PM, Vivien Malerba <vmale...@gmail.com> wrote:
> Hi!
>
> I have the following situation:
> * a prepared statement (for a SELECT) on which sqlite3_step has been called
> successfully (meaning having returned SQLITE_ROW or SQLITE_DONE each time)
> * I call sqlite3_reset() on it
> * I start using sqlite3_step again on it
>
> The question is: will the rows I read on the 2nd pass be the same as the
> ones I've read on the 1st pass, or will the statement be executed again (and
> may be different if the database has changed in the meanwhile)?

While I don't know the internal mechanics, I have a program that uses
several different prepared statements to access the same database, and
unless there were changes made, it will return the same things...

I have even gone so far as to have one statement doing a SELECT, and
then I step it a few times (but not through the whole set of rows),
and then another statement that does a DELETE, if the row that was
deleted was one of the rows yet to be returned by the first SELECT
statement, if I go back to stepping the SELECT statement, the deleted
row will NOT be included.

So, it would appear that the SELECT statements are dynamically
updated, if you do a DELETE in the middle of processing a SELECT.

Mike
>
> Thanks a lot!
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Peace may sound simple—one beautiful word— but it requires everything
we have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to