public Cursor getImages(long rowId) throws SQLException
{
Cursor mCursor =
db.rawQuery("select * from Pictures WHERE id=" + rowId + ";", null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
colonne della tabella "id, pic, comment"Sqlite come ottenere oggetti stringa con il cursore
voglio prendere valori di pic & commento a matrice di stringhe.
Il mio codice è:
int i=0;
Cursor c1 = db.getImages(memberId);
c1.moveToFirst();
while(c1.isLast()){
pictures[i]=c1.getString(1);
comments[i]=c1.getString(2);
i++;
}
questo non funziona.
Che errore hai ?? –