sqlite error database is locked

后端 未结 8 1212
天命终不由人
天命终不由人 2020-12-06 08:00

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

8条回答
  •  悲哀的现实
    2020-12-06 08:35

    your database is open close it using sqlite3_close(db) if you dont close then the process which accessed your database will be running background which will cause database is locked error.

    if you want to remove database is locked error then follow these steps 1.copy your database file to some other location. 2.then replace the database with the copied database 3.this will dereference all processes which were accessing your database file

提交回复
热议问题