Re: [sqlite] results from a prepared select statement

2007-03-14 Thread John Stanton

Rafi Cohen wrote:

Hi, I read the documentation but still miss this, so basic information.
I have a prepared select statement which should be executed in a later
state using sqlite3_step in my application.
For a very simple example, suppose the statement is: select * from tbl
where col1 = ?.
Now my question is how do I know, after sqlite3_step, if I got results
at all. I would like my application to have this information before
trying to retrieve the results by using sqlite3_column* functions. From
the other side, if I retrieve those results in a loop, I would like to
now how many rows I need to retrieve?
sorry, so basic but I still miss it.
Thanks, Rafi.

Look at the returned status.  Each time you retrieve a row you get a ROW 
status.  Test for it and process the row.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] results from a prepared select statement

2007-03-14 Thread Rafi Cohen
Hi, I read the documentation but still miss this, so basic information.
I have a prepared select statement which should be executed in a later
state using sqlite3_step in my application.
For a very simple example, suppose the statement is: select * from tbl
where col1 = ?.
Now my question is how do I know, after sqlite3_step, if I got results
at all. I would like my application to have this information before
trying to retrieve the results by using sqlite3_column* functions. From
the other side, if I retrieve those results in a loop, I would like to
now how many rows I need to retrieve?
sorry, so basic but I still miss it.
Thanks, Rafi.