Accessing database problem

Posted by anarche on Stack Overflow See other posts from Stack Overflow or by anarche
Published on 2010-04-04T11:50:27Z Indexed on 2010/04/04 11:53 UTC
Read the original article Hit count: 335

Filed under:

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?

© Stack Overflow or respective owner

Related posts about android