There is a code:
DB = new DataBase(getActivity()); DB.open(); cursor = DB.getPositions(); scAdapter = new SimpleCursorAdapter(getActivity(), R.layout.simple_item, cursor, new String[] {DataBase.Name}, new int[] {android.R.id.text1}, 0) Part of the DB:
Cursor getPositions() { return mDB.rawQuery("SELECT * FROM "+ TABLE, null); } How to declare scAdapter in the string new String [] {DataBase.Name} to make it read only the first line with _id = 0? Roughly speaking, it is necessary to read not one column, but several, but only the first lines.
The number of columns is unknown in advance.
"SELECT * FROM " + TABLE + " WHERE _id = 0"- get all the columns of the table whose _id = 0 column. - pavlofff