sqlite only supports 1 transaction?

.net, c#, concurrency, sqlite, transactions

Solution

One transaction per connection, yes, but it can have more than one connection (each with its own active transaction).

Update: interesting. I didn't know about shared-cache mode. If your connection is using that mode, only one transaction is available for all the connections using the same shared-cache. See SQLite shared-cache mode.

Problem

While using ADO.NET (maybe i am wrong, i dont know what its called) i notice that i can only begin a transaction with a connection and a command seems to have command.Transaction which gets me the transaction data but doesnt start a transaction itself? Actually while looking i see this in System.Data.SQLite ``` // Summary: // The transaction associated with this command. SQLite only supports one transaction // per connection, so this property forwards to the command's underlying connection. [Browsable(false)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public SQLiteTransaction Transaction { get; set; } ``` So SQLite only supports one transaction period? i tried opening another connection but then my transaction threw an exception about the DB being locked. So i cannot have more then one connection concurrent as well?

Original source