I am using SubSonic 2.1 and entcountered a problem while executing a Transaction with
SharedDbConnectionScope and TransactionScope. The problem is that in the obj.Save() method I get an "The connection must be valid and open" exception
I tracked down the problem to this line:
// Loads a SubSonic ActiveRecord object
User user = new User(User.Columns.Username, "John Doe");
in this Constructor of the User class a method "LoadParam" is called which eventually does
if (rdr != null)
rdr.Close();
It looks like the rdr.Close() implicitly closes my connection which is fine when using the AutomaticConnection. But during a transaction it is usally not a good idea to close the connection :-)
My Question is if this is by design or if it's an error in the MySqlDataReader.