mercredi 31 décembre 2014

SQlite parallel read and write in Android

I am working with sqlite in android. I have one database having almost 10 tables. I am accessing database through one SQLiteOpenHelper class. For each table's read and write i have written separate functions. Each functions having getReadableDatabase() and getWritableDatabase() respectively and end of each function am closing opened database with db.close() function. I have multiple threads to read and write parallel, while reading i am unable to write its shows database locked exception. I tried to use WAL but something is missing or not correct.


Which is the best way to implement WAL or parallel access to database ?


Aucun commentaire:

Enregistrer un commentaire