开发者

'The database file is locked' with System.Data.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...


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.

I fixed my problem by making sure to not keep commands or readers around and surrounding them with using statements.

(Web archived version of the link)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜