I am a newbie at DNN and VB.Net. I created a module following the tutorial on the codeproject web site. The link is www.codeproject.com/KB/applications/LCTDNNModDev.aspx
It is a really good tutorial.
Following the tutorial I created a table in the DNN database but I would like to use this module with a table in a different database. What would be the easiest way yto do that?
If I create another connection string in web.config, how do I tell the module which connection string to use?
The module was built using the DotNetNuke Dynamic Module template. Also I was wondering if I could change the sqldataprovider.vb file that I assume was created by the template, to access a different database. I see that there is code in the sqldataprovder.vb as follows;
' Read the configuration specific information for this provider
Dim objProvider As Framework.Providers.Provider = CType(_providerConfiguration.Providers(_providerConfiguration.DefaultProvider), Framework.Providers.Provider)' Read the attributes for this provider
'Get Connection string from web.config
_connectionString = Config.GetConnectionString()
If _connectionString = "" Then
' Use connection string specified in provider
_connectionString = objProvider.Attributes(
"connectionString")End If
It looks like I should be able to set the objprovider.attribute.connectionstring but I do not know how.
Any help would be appreciated.
Thanks
Judith