i try to read some rows out of an SQLite database. My problem is that only the first row of the table is displayed. Here is my codesnipped. I hope you can help me.
char* col_spaltenName;
char* col_spaltenInhalt;
while (sqlite3_step(statement) == SQLITE_ROW)
{
for (int i=0;i<count;i++)
{
if (sqlite3_column_name(statement,i))
col_spaltenName = (char*) sqlite3_column_name(statement,i); // giebt den SpaltenNamen an
else col_spaltenName = "LEER";
if (sqlite3_column_text(statement,i))
col_spaltenInhalt = (char*) sqlite3_column_text(statement,i); // giebt den Spaltenihnalt an
else col_spaltenInhalt = "LEER";
// NSLog(@"Inhaltstyp: %i %s: %s\n",sqlite3_column_type(statement,i),col_spaltenName,col_spaltenInhalt);
NSLog(@"Inhaltstyp: %s: %s\n",col_spaltenName,col_spaltenInhalt);
// NSLog(@"Inhaltstyp: %s\n",col_spaltenInhalt);
}
}
Aucun commentaire:
Enregistrer un commentaire