to dear all Android developers,
I'm dealing with database operation on Android recently.
However, there has a problem troubles me that the query method in
SQLiteQueryBuilder infinitely loops and has no return.
The operation code is like below:
//------------ CODE section --//
SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
qb.setTables(TABLE.NAME);
qb.setProjectionMap(TABLE.ProjectionMap);
qb.appendWhere(TABLE._ID + "=" + id + " AND "
+ TABLE.SURNAME + "='" + surname + "'");
String orderBy = TABLE._ID + " ASC";
String[] projection = new String[] {
TABLE._ID
};
mDbHelper = new DatabaseHelper(mCtx);
mDb = mDbHelper.getWritableDatabase();
Cursor c = qb.query(mDb, projection, null, null, null, null, orderBy);
//------------ CODE section --//
However, it stuck in the query and never return back, and there has
neither exceptions nor any error messages from the LogCat. Does there
any mistake I make in my code?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---