'The database file is locked' with System.Data.SQLite

后端 未结 1 1100
别那么骄傲
别那么骄傲 2020-12-19 02:56

I am suddenly getting the following errors from SQLite after adding a new transaction:

The database file is locked database is locked

相关标签:
1条回答
  • 2020-12-19 03:31

    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 讨论(0)
提交回复
热议问题