Change SQLite database mode to read-write

前端 未结 14 571
盖世英雄少女心
盖世英雄少女心 2020-12-13 01:35

How can I change an SQLite database from read-only to read-write?

When I executed the update statement, I always got:

SQL error: attempt to wr

14条回答
  •  [愿得一人]
    2020-12-13 02:33

    To share personal experience I encountered with this error that eventually fix both. Might not necessarily be related to your issue but it appears this error is so generic that it can be attributed to gazillion things.

    1. Database instance open in another application. My DB appeared to have been in a "locked" state so it transition to read only mode. I was able to track it down by stopping the a 2nd instance of the application sharing the DB.

    2. Directory tree permission - please be sure to ensure user account has permission not just at the file level but at the entire upper directory level all the way to / level.

    Thanks

提交回复
热议问题