SQLiteDatabase db = new MySQLiteOpenHelper(this).getReadableDatabase();
String table = SQLContract.tables.Score.TABLE_NAME;
String [] columns = {SQLContract.tables.Score._ID,SQLContract.tables.Score.COLUMN_NAME_player_Name,SQLContract.tables.Score.COLUMN_NAME_Score};
String selection = null;
String [] selectionArgs = null;
String groupBy = null;
String having = null;
String orderBy = null;
Cursor c = db.query(table, columns, selection, selectionArgs, groupBy, having, orderBy);
int [] to = {android.R.id.text1};
String [] from = { SQLContract.tables.Score.COLUMN_NAME_player_Name};
SimpleCursorAdapter sca = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, c, from, to, SimpleCursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
setListAdapter(sca);
我想在列表视图上显示数据bt此代码不起作用......有人对此有帮助......???
这是错误(1)没有这样的列:_id