0

如何获取 ID 的行?我尝试所以这是不可能的。

case 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);
             if (c.moveToFirst()) {
                    String name = c.getString(c.getColumnIndex(DbTest.NAME));
                    textView1.setText(name);
                    }
            }

            break;
4

0 回答 0