美文网首页
sqlite出现Error: attempt to write

sqlite出现Error: attempt to write

作者: 湿子 | 来源:发表于2016-07-27 18:00 被阅读67次

在多个线程同时操作sqlite的数据表是  发现sqlite会自动锁表  出现这个错误

Error: attempt to write a readonly database

百度了很久都找不到很好的解决方法,最后自己使用了线程锁,在sqlite锁表之前自己先锁住 避免后续操作不了数据表的问题

相关文章

网友评论

      本文标题:sqlite出现Error: attempt to write

      本文链接:https://www.haomeiwen.com/subject/emkrhttx.html