It is a bit too complex to show my code, because the sqlite2_*  
functions are wrapped two layers deeper than my code is using.
Also the code is in a GUI that supports 'cursors'.

Basically I can use the application and the table whose statement will  
fail to get any rows later, shows me the expected data before
re-issuing the query. But this re-issuing is also done on other places  
in my application with no failure. That makes me wonder.

Now I have tried to remove existing where clauses in case of no data  
and do report an error message when then also no data is available.

It fails too.

I also tried to figure out if I am in the right database file, but  
that was ok by the way I checked that.

A question: Could I query for the database file from the current  
sqlite database handle ?

Thanks

Lothar

PS. If nothing helps, I'll try to setup a test case for this with  
plain sqlite commands, as they appear in my program flow.

Am 07.09.2008 um 14:17 schrieb Martin Engelschalk:

> Hello Lothar,
>
> sorry, i did not read your questions fully.
>
> No, after you get SQLITE_DONE, you do not have any data in your  
> result set.
> After issuing sqlite_reset, you can not read any data, the statement
>
> Use the statement like this:
> - sqlite3_prepare the statement.
> - Use sqlite3_bind_xxx to set your bind variables
> - execute sqlite_step() while it returns SQLITE_ROW and read the data.
>  If it returns SQLITE_DONE,
> - sqlite3_finalize() your statement or sqlite3_reset() ist to  
> execute it
> again, perhaps with other bind variable values.
>
> Martin
>
> Lothar Behrens wrote:
>> Hi,
>>
>> I am struggling with the following situation:
>>
>> I have a table where two rows are inserted. I create a new prepared
>> select statement to get a resultset.
>>
>> After getting the resultset I issue a sqlite3_step to see, if I hava
>> any data. Thus of two rows I assume to get
>> SQLITE_ROW.
>>
>> But I get SQLITE_DONE.
>>
>> My questions:
>>
>> After getting SQLITE_DONE, do I still have a row in my result set as
>> the last row for any sqlite3_step calls ?
>>
>> Is so, am I allowed to read the columns of this row after a
>> sqlite3_reset has been issued ?
>>
>> Is SQLITE_DONE a flag to be handled as the following SQLITE_ROW +
>> 'have the last row now' ?
>>
>> Thanks
>>
>> Lothar
>>
>> -- | Rapid Prototyping | XSLT Codegeneration | http:// 
>> www.lollisoft.de
>> Lothar Behrens
>> Heinrich-Scheufelen-Platz 2
>> 73252 Lenningen
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>
> -- 
>
> * Codeswift GmbH *
> Traunstr. 30
> A-5026 Salzburg-Aigen
> Tel: +49 (0) 8662 / 494330
> Mob: +49 (0) 171 / 4487687
> Fax: +49 (0) 12120 / 204645
> [EMAIL PROTECTED]
> www.codeswift.com / www.swiftcash.at
>
> Codeswift Professional IT Services GmbH
> Firmenbuch-Nr. FN 202820s
> UID-Nr. ATU 50576309
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen








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

Reply via email to