'数据库文件被锁定“与System.Data.SQLite [英] 'The database file is locked' with System.Data.SQLite
问题描述
我突然收到来自SQLite的下列错误添加一个新的事务后:
I am suddenly getting the following errors from SQLite after adding a new transaction:
该数据库文件被锁定数据库
锁定
The database file is locked database is locked
有没有人见过这个?我添加了一个更新事务(以下一些成功的选择/插入)。我找不到任何有关这一个不同的...
Has anyone seen this? I added an update transaction (following some successful selects/inserts). I can't find anything different about this one...
推荐答案
我想通了。通过观察这个 [真是老]在phxsoftware现场线程,似乎可以有锁定问题,如果你不立即处理读者和执行他们的命令后,
I figured it out. From looking at this [really old] thread on the phxsoftware site, it seems like there can be locking problems if you don't immediately dispose of readers and commands after executing them.
我只要确保跟不上命令或读者各地及与周围它们固定我的问题using语句。
I fixed my problem by making sure to not keep commands or readers around and surrounding them with using statements.
这篇关于'数据库文件被锁定“与System.Data.SQLite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!