I am trying to determine the best way to specify what OpenAccess connection to use at runtime. I found 2 different articles Todd Anglin regarding this.
1) http://blogs.telerik.com/blogs/posts/09-01-06/Understanding_Where_to_Set_Connection_Strings_in_OpenAccess.aspx
2) http://blogs.telerik.com/toddanglin/posts/09-01-09/improving_openaccess_objectscopeprovider_for_runtime_connection_config.aspx
In the first article, Todd specifies to use the Telerik.OpenAccess.Database.Get() method to specify a string for the connection name. I assume after that, you call GetObjectScope on the resulting Database object to get the IObjectScope for execution. This seems to work for me, but it makes me wonder why article 2 exists and what the generated ObjectScopeProvider1.cs file is really for. The AdjustForDynamicLoad() method seems to be the only useful method in the generated ObjectScopeProvider1 class and I'm not completely sure what that does, but Todd doesn't modify that in the second article. Under what circumstances is it necessary to use something other than Database.Get(...).GetObjectScope()?
Thanks in advance,
Lars Solberg