I have created the Simple Application of the sqlite database. In which i am successful to implement the insert data. But i want to delete all the data while starting of the activity.
I have use the cursor to fetch the data and display. But dont know how to delete all the data.
I have use this.db.delete(DATABASE_TABLE, null, null); to delete the all rows. but it will not delete my data that are added before in database.
I have implement the Database Example from this link: Here is the Link
So, Please let me know, what i have to do, to delete all the data while starting the activity.
i think in the starting of the activity firstly u need to check whether the cursor.getcount() > 0 then fire delete query.
hope may work for u…