[android-developers] Re: Do Cursor s stay valid across database changes?

2009-05-13 Thread Marco Nelissen
The Cursor holds a copy of the data, so it might be holding data that no longer matches what's in the database. Normally you'd use a ContentObserver or DatasetObserver with your cursor to be notified when the cursor needs to be requeried. On Wed, May 13, 2009 at 6:38 AM, Hamy hamilt...@gmail.com

[android-developers] Re: Do Cursor s stay valid across database changes?

2009-05-13 Thread Hamilton Turner
Marco, Thanks for the reply. Do you happen to have a link to this being used? I though a cursor was similar to PHP's handle, meaning that it did not retrieve the data until the data was actively requested, saving on all sorts of things. So if I had a class with 5 cursors, all pointing to

[android-developers] Re: Do Cursor s stay valid across database changes?

2009-05-13 Thread Dianne Hackborn
It makes a copy. This is how SQLite works. What things you need to observe is really dependent on your schema... and if this isn't behind a content provider, it is actually entirely up to you to tell your code when things change so you can do that however you want. On Wed, May 13, 2009 at 9:35