Hiiii Yaa u can delete the whole table table using delete method supplying table name and where and whereargs as null.Inside the delete method of your contentprovider call the delete method of SQLiteDatabase.
I guess this will work. On Mar 16, 1:04 pm, Makas Tzavellas <makas.tzavel...@gmail.com> wrote: > Can't say that I have tried this myself, but you can perhaps "cheat" > by doing something like this > > String where = "_id != -1"; > > You probably would not have any id fields with negative value, so in > theory, all records in the table should match that and therefore be > deleted. > > Makas > > On Mar 16, 1:33 pm, Hugh <pufftis...@gmail.com> wrote: > > > > > Hello, > > > Is it possible to delete all rows of a content provider's table with > > the content provider's delete() method? > > > I see that you can delete a single row, and multiple rows, but if you > > supply no WHERE clause, will that be the same as deleting all rows? It > > does not seem to work for me: > > > int delRows = getContentResolver().delete(MUSIC.CONTENT_URI, null, > > null); > > Log.i(TAG, "number of del rows: " + delRows); > > > How can I accomplish leaving the table structure but emptying its > > contents using a content provider? > > > Thanks!- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en