SQLite, wie man Zeichenketteneinträge mit dem Cursor erhält

<code>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;


    }
</code>

Tabellenspalten "id, pic, comment"

Ich möchte die Werte von pic & comment in ein String-Array übernehmen.

Mein Code ist:

<code>int i=0;
        Cursor c1 = db.getImages(memberId);     
        c1.moveToFirst();
        while(c1.isLast()){
            pictures[i]=c1.getString(1);
            comments[i]=c1.getString(2);
            i++;
        }
</code>

das funktioniert nicht.

Antworten auf die Frage(5)

Ihre Antwort auf die Frage