0

My iOS app is connecting to a SQLite db using FMDB. Upon app initialisation the db is created/copied if required.

I can then open the copied database in DB Browser and manipulate data. If I then run the app (let it finish) whilst leaving DB Browser open upon trying to manipulate data again DB Browser says that the database is write protected. If I close the database within DB Browser and re-open it then I can edit data fine.

It just seems to be a problem when running the app with DB Browser open then prevents DB Browser from accessing the DB.

Does anyone know if there is a way round this?

nhgrif
  • 61,578
  • 25
  • 134
  • 173
JIbber4568
  • 839
  • 4
  • 16
  • 33
  • I don't think SQLite is really designed to be accessed from multiple processes, or perhaps would need to be compiled with particular compiler flags. Sounds like the answer is to close the app while using the DB Browser. – trojanfoe May 01 '15 at 10:37
  • @trojanfoe - I think it does allow to be accessed by multiple processes. [This SO Thread](http://stackoverflow.com/questions/10325683/read-and-write-sqlite-database-data-concurrently-from-multiple-connections) explains it, also sqlite3 [Documentation](http://sqlite.org/faq.html#q5) covers it, but i am not sure what is the problem here. – Gandalf May 01 '15 at 12:12

0 Answers0