SQLITE Android delete query Executed but not Delete That value. It Shows again on APP launch -


here code

public void deletenote(string tv){      sqlitedatabase db = this.getwritabledatabase();     db.execsql("delete tbt name='" + tv +"'");     db.close(); } 

image:

enter image description here

you should use db.delete

public void deletenote(string tv){         sqlitedatabase db = this.getwritabledatabase();         db.delete(database_table, key_name + "=?", new string[]{tv});     } 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -