TransactionScope and SQLite database gets locked

前端 未结 2 1473
一生所求
一生所求 2021-01-18 11:02

I am trying to use Entity Framework 6 with SQLite and running into a database locked issue when trying to use TransactionScope. Here is my code:



        
2条回答
  •  走了就别回头了
    2021-01-18 11:58

    One common situation to cause this problem is that another application is accessing the same database.

    In my situation it’s because that I opened the database with DB Browser for SQLite, deleted a database table and not applying the changes.

    Clicking Write Changes (or Revert Changes or Close Database) and the error will be gone.

    (Taken from http://redino.net/blog/2017/03/net-sqlite-database-locked)

提交回复
热议问题