Re: Android Tips and tricks Deleting a Record
To delete a single record, call ContentResolver.delete() with the URI of a specific row, or call Cursor.deleteRow().
To delete multiple rows, call ContentResolver.delete() with the URI of the type of record to delete (for example, android.provider.Contacts.People.CONTENT_URI) and a SQL WHERE clause defining which rows to delete (Warning: be sure to include a valid WHERE clause if deleting a general type using ContentResolver.delete(), or else you risk deleting more records than you intended!).
Remember, whenever calling updating methods on the Cursor class, you must call commitUpdates() to send the changes to the database.
__________________
cheers
Aman
|