How do I unlock a SQLite database?

前端 未结 30 1736
栀梦
栀梦 2020-11-22 15:56
sqlite> DELETE FROM mails WHERE (`id` = 71);
SQL error: database is locked

How do I unlock the database so this will work?

30条回答
  •  渐次进展
    2020-11-22 16:32

    One common reason for getting this exception is when you are trying to do a write operation while still holding resources for a read operation. For example, if you SELECT from a table, and then try to UPDATE something you've selected without closing your ResultSet first.

提交回复
热议问题