Rafi Cohen <[EMAIL PROTECTED]> wrote:
Now my question is how do I know, after sqlite3_step, if I got results at all.
sqlite3_step returns SQLITE_ROW if you got a row of results, SQLITE_DONE if no more rows, and SQLITE_ERROR in case of error. If resultset is empty, you'll just get SQLITE_DONE on the first call.
I would like my application to have this information before trying to retrieve the results by using sqlite3_column* functions.
You can only use sqlite3_column* functions if the previous call to sqlite3_step returned SQLITE_ROW.
From the other side, if I retrieve those results in a loop, I would like to now how many rows I need to retrieve?
You can't know that until you retrieve them all. SQLite engine itself doesn't know that. Just keep going until you get SQLITE_DONE.
Igor Tandetnik
----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------