1

I have a couple of threads and I'm using SQLite for storage. When I'm trying to access the database I'm getting SQLITE_BUSY error.

Is there a way how to fix this problem other than trying at each request ?

2 Answers 2

2

You are most likely running in serialized mode. But ... you're probably looking to run in multi-threaded mode instead. Note that you will need a separate database connection in each thread if you go that route.

Here is the link to the documentation goodness: http://www.sqlite.org/threadsafe.html

Sign up to request clarification or add additional context in comments.

Comments

0

Ignore my last answer.

You can use the sqlite3_errmsg function to get the error message as string and print it using NSLog or other ways as soon as error occurs to find the more appropriate and proper reason. http://www.sqlite.org/c3ref/errcode.html

You probably seem to be running in to serialization issue; I am not sure where.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.