On Mon, Mar 1, 2010 at 6:31 PM, Pavel Ivanov <paiva...@gmail.com> wrote:

> sqlite3_changes() is exactly what you should use in this case. And I
> didn't understand why did you find it unsuitable for you?
>
> Pavel
>


I think I understand his confusion. Imagine if for some reason you don't
know whether last query is amongst INSERT, UPDATE, or DELETE (for example it
could be SELECT). But he probably wants that some call or fragment of code
return number of changes or 0 for any recent operation including SELECT. If
he just relies on sqlite3_changes() after INSERT with two rows affected and
simple SELECT afterward, this call will still return 2. In this case  I'd
recommend using difference between consequitive sqlite3_total_changes()
values. For any read-only query this difference will always be zero.

Max
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to