Re: [sqlite] Use of sqlite3_step()

2010-07-06 Thread Andrew Wood
Whoops thats what comes of writing code when you're feeling under weather :) Thanks On 06/07/10 16:43, Mike Shal wrote: > > I haven't tried it, but I suspect this is your problem. It looks like > you're declaring a new 'queryreturn' int, but the while loop is > checking against the one from the t

Re: [sqlite] Use of sqlite3_step()

2010-07-06 Thread Sam Carleton
I use a bit simpler approach, don't know if it is correct or not, but it seems to work: int rc = sqlite3_step(stmt); while(rc == SQLITE_ROW) { /* read the row info */ rc = sqlite3_step(stmt); } if( rc != SQLITE_DONE) { /* handle error */ } ___

Re: [sqlite] Use of sqlite3_step()

2010-07-06 Thread Mike Shal
On 7/6/10, Andrew Wood wrote: > Whats the procedure for using sqlite3_step? > > I thought it would be along the lines of the following, but the while > loop executes infinately. I would have expected the while loop to run > once for each row found? > > Code is as follows: > > int queryreturn

[sqlite] Use of sqlite3_step()

2010-07-06 Thread Andrew Wood
Whats the procedure for using sqlite3_step? I thought it would be along the lines of the following, but the while loop executes infinately. I would have expected the while loop to run once for each row found? Code is as follows: int queryreturn = sqlite3_step(preparedstatement); if (queryretu