This is my database method to insert data in it... It was working fine and suddenly, out of nowhere it started giving FATAL EXCEPTION
public boolean insertReport(String name, String title, String date, String status) {
db.beginTransaction();
try {
ContentValues cv = new ContentValues();
cv.put("name", name);
cv.put("elabel_title", title);
cv.put("date", date);
cv.put("status", status);
db.insertOrThrow("savedreports", null, cv);
db.setTransactionSuccessful();
} catch (SQLiteConstraintException e) {
return false;
} finally {
db.endTransaction();
}
return true;
}
I debugged it using breakpoints, All going good but after execution of cv.put("status", status); line it jumps directly to the finally block :/
Not executing the insertOrThrow...
What am i doing wrong???
Aucun commentaire:
Enregistrer un commentaire