嗨,我使用此查詢,但它沒有奏效。它返回錯誤查詢沒有工作
12-08 17:04:21.498: ERROR/AndroidRuntime(1867): android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 1
Cursor mCursor = dbRead.query(DBHandler.TABLE_NAME, new String[] {"LevelNumber", "LevelState" }, "LevelNumber = " + level_Number +"", null, null, null, null);
for(int i=0; i<mCursor.getCount(); i++) {
levelNumber = mCursor.getString(0);
levelState = mCursor.getString(1);
}
Thanx Valentin Rocher – Nuraiz 2010-12-10 07:17:09