I encountered bug in my programm because of SubSonic3 returns records with default connection string in
SingleOrDefault(ByVal expression As System.Linq.Expressions.Expression(Of System.Func(Of Company.filter, Boolean)), ByVal connectionString As String, ByVal providerName As String)
In Subsonic sources, Database.cs line 323:
instance = Activator.CreateInstance<T>();
I think that was the cause of problem in my case. It creates instance with default constructor and then returns it as a result, that's where we loose custom connection string.
Personally I fixed it with adding 2 lines to ActiveRecord.tt template, in SingleOrDefault function, which has connectionString argument:
single._db=new <#=Namespace#>.<#=DatabaseName#>DB(connectionString, providerName);
single._repo = new SubSonicRepository<<#=tbl.ClassName#>>(single._db);
But I think you should examine this problem deeper, Rob :)