Meryl Silverburgh wrote: > Hi, > > I call ContentResolver's query method to get a Cursor, and I would > like to update the title of that row to 'new title' > can you please tell me how to do it? > > final ContentResolver cr = context.getContentResolver(); > Cursor c = cr.query(MY_CONTENT_URI, > new String[] { "title"}, "title=?", > new String[] { title }, null); > > if (c.getCount() > 0) { > // want to update the title to 'new title' > > }
context.getContentProvider().update() There is no update() method on Cursor. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---