[Solved] How to update a SQLite database in android?
try this, public void updateQty(Integer qty,String bookId) { int originalQty = getQuantity(bookId); int updateQty = originalQty – qty; try{ SQLiteDatabase db = this.getWritableDatabase(); String rawQuery = “update ” + BOOKS_TABLE + ” set ” + KEY_QTY + ” = ” + updateQty + ” where ” + KEY_BOOK_ID + ” = ‘” + bookId + … Read more