Hi!

Check the column count after sqlite3_prepare(). You don't need to execute
the query to get the column count.

----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
On Feb 14, 2012 5:50 PM, "Marc L. Allen" <mlal...@outsitenetworks.com>
wrote:

> > > Without examining the SQL itself, is it possible to determine whether
> > > an SQL statement returned no results because no rows matched the
> > > criteria or because the statement doesn't return rows?
> >
> > sqlite3_column_count should do the trick: SELECT would always have at
> > least one, while UPDATE and such would have zero.
>
> Ok.. I just want to make sure I understand.  A SELECT which returns no
> rows will still have a non-zero column count?  And, I would check the
> column count after step() returns SQLITE_DONE?
>
> Marc
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to