Hi,

I don't know if it's the right mailing list to talk about
System.Data.SQLite.dll.

DbTransaction has a property Connection that corresponds to the connection
used by the transaction. I don't understand why calling Commit or Rollback
on the transaction automatically sets that property to null. (Current
DbTransaction code:
http://system.data.sqlite.org/index.html/artifact/67e66c1357d3d9ba4427165afa39b5cabc28741c).

I noticed that behaviour because I did something like:
if (error)
{
    transaction.Rollback();
    transaction.Connection.Close(); // NullReferenceException as Connection
was set to null by Rollback().
}

I'm using an abstraction layer to be able to target different databases,
and at least "MySQL Connector .Net" has a more normal behaviour (at least
to me) as it doesn't change the Connection property.

Any thoughts on this?

  Riz Thon
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to