If you want DotNetNuke.Data.DataProvider.Instance to accept a parameter you will have to add logic for it to do so
In the library (4.4.0) you need to edit Components\Providers\Data\DataProvider.vb
Not sure if I exaxtly have it but maybe on the new command it could accdept some string as a parameter of what sql connect string to use
It seems to me you could place some sort of logic in here
#Region "Shared/Static Methods"
' singleton reference to the instantiated object
Private Shared objProvider As DataProvider = Nothing
' constructor
Shared Sub New()
CreateProvider()
End Sub
' dynamically create provider
Private Shared Sub CreateProvider()
objProvider = CType(Framework.Reflection.CreateObject("data"), DataProvider)
End Sub
' return the provider
Public Shared Shadows Function Instance( MAYBE SOMETHING HERE ) As DataProvider
Return objProvider Seems I would have to add something to the constructor to handle the string though -
End Function
#End Region
That would allow us to add in something to select a sql connect string from the web config
Anybody with more knowledge got a thought or two here!