I am working on a .NET application that uses the SQLite. As per SQLite documentation, it supports multi-threading and can be used in one of following 3 modes
As per these modes, I am trying to use the Serialized where I am sharing the Single connection across multiple Tasks. But I get the error as "Operation is not valid due to the current state of the object."
I guess this is due to the sharing of single connection across tasks. But As per the Serialized mode I should be able to share the connection without doing any explicit locking or mutex implementation. Can any one please guide me how I can use the Serialized mode in .net application ? Does it requires connection string to be mentioned in certain way ?
Thanks in Advance !
Serialized is the default mode. Do not close open connection again instead yse the same single connection every where without need of closing it. SQLite will take care of rest. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With