Sqlite Database Is Locked Exception
I am using c# application and running the application in server machine as windows service.When i perform insert , update delete operation from client machine it throws database lo
Solution 1:
From the code provided it seems that you do not close the connecttion.
Pay attention also on fact, don't know if it's relevant in your case or not, that the Sqlite not very good on supporting concurent inserts and sometimes db got lock, if you operate on it from multiple threads.
Solution 2:
Change the way you create your Connection and Command objects to be more like this: https://stackoverflow.com/a/17592858/8479
Make sure you're not re-using any Sqlite object on a different thread to the one it was created on.
Sqlite is normally great at concurrency provided you follow those two rules.
Post a Comment for "Sqlite Database Is Locked Exception"