I use the following code, but am experiencing some problems:
mDb.beginTransaction(); String updateQuery ="Query entered here"; String[] valVars = { Variables initialized here }; Cursor c = mDb.rawQuery(updateQuery, valVars); if (c != null) { mDb.setTransactionSuccessful(); mDb.endTransaction(); return true; } else { mDb.endTransaction(); return false; }
When I use debug instead of running return true , it directly returns return false, even if it is in the else statement. Please tell me what the problem is and how to do it.
source share