我想在TextView中放入一些数据。我的代码到目前为止:
myDataBase = myDbHelper.getReadableDatabase();
Cursor cursor = myDataBase.rawQuery(KLASSEN_SELECT_RAW, null);
startManagingCursor(cursor);
SimpleCursorAdapter sca =
new SimpleCursorAdapter(this, R.layout.barinfo_layout, cursor, new String[]
{"name"}, new int[] {R.id.barinfo_barinfo});
barinfo.setText((CharSequence) sca);
Eclipse不会显示错误,但是当我执行它时程序会崩溃。 我需要改变什么?