I use a fairly simple command to try to delete rows in a SQLite database. However, after successful execution of the command, the rows remain in the database !?
SQLiteDatabase dbinst = mydb.getWritableDatabase(); try { dbinst.beginTransaction(); int del = dbinst.delete("sms", "wassent = ? or waserror = ? or wasaborted = ?", new String[] {"1", "1", "1"} ); clog.debug("Rows deleted: " + del); dbinst.setTransactionSuccessful(); } catch(Exception e) { clog.error(e.toString(),e); } dbinst.close();
The registrar says that "lines deleted: 3" and no exceptions are raised. However, when you execute the query right after that, do the rows still exist?
Any obvious thing I'm doing wrong here?
source share