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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

Ansible warning on jinja2 braces on when -

html - How to custom Bootstrap grid height? -