I am have a sqlite database in the iPhone application I am writing. I get an error with following code that I am running in a background thread. In the background thread, I
Your database is open. Close it using sqlite3_close(db).
sqlite3_close(db)
If you don't close, then the process accessing your database will be running background which will cause database is locked error.