案例 R.id.buttonTest: {
String[] projection = {DbTest.NAME};
String selection = "_id = ?";
String[] selectionArgs = { String.valueOf(1) };
Cursor c = sqdb.query(DbTest.TABLE_NAME,projection,selection,selectionArgs ,null,null,null);
String name = c.getString(c.getColumnIndex(DbTest.NAME));
textView1.setText(name);
}
break;
日志猫:
引起:android.database.CursorIndexOutOfBoundsException:请求索引-1,大小为1
有什么问题?我不明白。