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 (queryreturn == SQLITE_DONE)
{
//no rows found
return;
}
else if (queryreturn == SQLITE_ROW)
{
//row found, will process in a sec
}
else
{
//error, throw exception
}
//if we get here we have 1 or more rows to process
while (queryreturn==SQLITE_ROW)
{ //process row
printf("row found\n");
//advance to next row
int queryreturn = sqlite3_step(preparedstatement);
}
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users