Skip to content Skip to sidebar Skip to footer

Android Delete Item Listview And Database

Been a little stuck here. I can delete the item in the listview but have problems deleting it from the database too: My listview class: @Override protected void onCreate(Bundle

Solution 1:

Please try to move line dataSource.close() inside the onDestroy() method instead. The problem is that you close the database in onCreate().

And also update the delete method to: database.delete(VorgangDbHelper.TABLE_VORGAENGE_LIST,VorgangDbHelper.COLUMN_ID + " = ?", new String[] { s_id });

Post a Comment for "Android Delete Item Listview And Database"