Has anyone encountered this and is there a solution to work around it?

I'm creating a Thread and in that thread I open a database connection
using the DBHelper, perform an update on a field in my database and
close it. I create a separate one in the Thread because if the View is
closed the global one for that view is closed, causing my Thread
update to throw an error.

The thread is in a View, that also has it's own instance of the
DBHelper and
opens the database onCreate
closes it onPause
opens it onResume
closes it onDestroy

The instance in my Thread is throwing this but not all the time :error
code 5: database is locked

Is there a known practice I should implement so I don't get this error?

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