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;
}
表列获得字符串项“ID,PIC,评论”SQLite的了如何使用光标
我想利用PIC &注释值字符串数组。
我的代码是:
int i=0;
Cursor c1 = db.getImages(memberId);
c1.moveToFirst();
while(c1.isLast()){
pictures[i]=c1.getString(1);
comments[i]=c1.getString(2);
i++;
}
这不工作。
你有什么错误? – 2012-04-26 09:01:07