>I investigated a further while exploring some of the list >suggestions. The app halts with an error unless >sqlite3_column_count() > 0. That means I misspoke when I mentioned >that the sql statement needed to return at least one row. I’m not >sure if that makes a difference, though.
That makes a *huge* difference. sqlite3_column_count() is available after the prepare and before the first step. This means that the statement can be cancelled BEFORE it is executed (step'ed). "returns no rows" can only be determined by running (step'ing) the statement and requires the statement to be both prepared and run (and that it returns SQLITE_DONE with no SQLITE_ROW). In the former case all statements which are not select/pragma statements returning data do not have to be run. In the latter case, all statements will be run and you will get the "no data was returned" if no data was returned. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users