Re: [sqlite] Urgent: sqlite3_step and SQLITE_DONE ?

2008-09-07 Thread Lothar Behrens
That is done by the wrapper class wrapping the sqlite API calls - as I understand. It seems really that I don't have any data, because on failure a simple query without where clause also fails. As posted here, I'll see what the PRAGMA database_list gives me back. Thanks, Lothar Am

Re: [sqlite] Urgent: sqlite3_step and SQLITE_DONE ?

2008-09-07 Thread John Stanton
You get ROW if there is a row available, DONE if there are no rows, or all the rows have been extracted. Your program needs to test for both states. Lothar Behrens wrote: > Hi, > > I am struggling with the following situation: > > I have a table where two rows are inserted. I create a new

Re: [sqlite] Urgent: sqlite3_step and SQLITE_DONE ?

2008-09-07 Thread Martin Engelschalk
Hello Lothar, yes, PRAGMA database_list will show you the database the handle is attaches with. Treat tis statement as a Select - Statement, ist returns at least one row of data, and the field "file" contains the filename of the database. Martin Lothar Behrens wrote: > It is a bit too

Re: [sqlite] Urgent: sqlite3_step and SQLITE_DONE ?

2008-09-07 Thread Lothar Behrens
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

Re: [sqlite] Urgent: sqlite3_step and SQLITE_DONE ?

2008-09-07 Thread 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

Re: [sqlite] Urgent: sqlite3_step and SQLITE_DONE ?

2008-09-07 Thread Martin Engelschalk
Hello Lothar, you should indeed get SQLITE_ROW. Can it be that your select statement has a where - clause that does not fir your data? Perhaps you want to post your statements here, beginning with create table. Martin Lothar Behrens wrote: > Hi, > > I am struggling with the following

[sqlite] Urgent: sqlite3_step and SQLITE_DONE ?

2008-09-07 Thread Lothar Behrens
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