Basically I have a list page which I get from the network and cache it in
the local DB. and on list item click the details of the list is displayed

In the list page i have the refresh button which gets the latest state of
the list.I run a thread to update the list.


When the thread is running and I click on the list item,I again open the DB
to get the details of the list item.


The prob occurs when I click on the refresh button and if I immediately
click(that is when the DB operations are running) on the list item,then a
"database is locked" excpetion occurs,I have no idea as to how to solve this
exception

04-21 15:02:46.605: ERROR/AndroidRuntime(554):
android.database.sqlite.SQLiteException: database is locked
04-21 15:02:46.605: ERROR/AndroidRuntime(554):     at
android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
04-21 15:02:46.605: ERROR/AndroidRuntime(554):     at
android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1470)
04-21 15:02:46.605: ERROR/AndroidRuntime(554):     at
android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1424)
04-21 15:02:46.605: ERROR/AndroidRuntime(554):     at
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:537)
04-21 15:02:46.605: ERROR/AndroidRuntime(554):     at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:558)
04-21 15:02:46.605: ERROR/AndroidRuntime(554):     at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:551)


I did see some of the  thread whch discussed this issue,but found no
solution on this.Could any one shed some light on it.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to