When i execute the program written in scala to retrieve all rows but it display
the latest one inserted.
Can anybody help me how to rectify this.Or i want to do any changes?
while(1)
{
// fetch a row's status
retval = sqlite3_step(stmt);
if(retval == SQLITE_ROW)
{
// SQLITE_ROW means fetched a row
// sqlite3_column_text returns a const void* , typecast it to const char*
for(col=0 ; col<cols;col++)
{
const char *val = (const char*)sqlite3_column_text(stmt,col);
printf("%s = %s\t",sqlite3_column_name(stmt,col),val);
}
printf("\n");
}
else if(retval == SQLITE_DONE)
{
// All rows finished
printf("All rows fetched\n");
break;
}
else
{
// Some error encountered
printf("Some error encountered\n");
return -1;
}
}
Original issue reported on code.google.com by durgadev...@gmail.com on 22 Sep 2010 at 1:28
Original issue reported on code.google.com by
durgadev...@gmail.com
on 22 Sep 2010 at 1:28