在使用ADO.NET时(也许我说错了,不知道它叫什么),我注意到我只能通过连接开始一个事务,而命令似乎有command.Transaction,可以获取事务数据,但本身并不开始事务?实际上,在查看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; }
那么SQLite只支持一个事务周期吗?我尝试打开另一个连接,但是我的事务抛出了一个关于数据库被锁定的异常。所以我不能有多个并发连接吗?