Fragment Activity With A Npe
Hi I'm trying to create my first fragment activities and thnx for the help from Natali (Cont from this thread). I convertied a class that worked fine into a fragmentand I've made
Solution 1:
Caused by: java.lang.IllegalArgumentException: column '_id' does not exist
Means you don't have a column named _id in you table.
See this link.
"Adapter that exposes data from a Cursor to a ListView widget. The Cursor must include a column named "_id" or this class will not work."
EDIT:
Looks like the query may be invalid. I think what you want is:
Cursorc= db.rawQuery(QUERY_KEY + " ORDER BY `_id` " + QUERY_ORDER, null);
If you still have issues add more info to log:
Log.e("QUERY", q + " ORDER BY `_id` " + qO);
EDIT:
Why are you doing this q = extras.getString(QUERY_KEY);
Is the query being pass from another activity? Seem like you want loadQuery(QUERY_KEY);
Post a Comment for "Fragment Activity With A Npe"