Accessing database problem
- by anarche
Ok, so I've got an SQLiteOpenHelper that prepares and returns a SQLiteDatabase object; this is written singleton-pattern, so the database is opened once and only closed when the Activity closes. From there I have three database wrappers encapsulating the queries (some returning cursors to datasets, some inserting data) used by the Activity.
I want to insert data from one View, then have that automatically update in another View on the same Dialogue. I'm writing this on a notepad and testing on the phone (since the emulator crashes the notepad...), so I can't pull up stacktraces atm.
So questions:
1) are there limitations to writing to a database, when there are cursors open on the database?
2) Does a Cursor.requery()? call update the ListView with the cursor as a data connector?