Hi,
I think I'm lacking in understanding of data provider model in general, and DNN's implementation of Data Providers in particular. I've read Rob Howard's articles on MSDN,but it did not make things any more clear.
I have a module that gets the data from an Oracle database, so I need to configure the application so I can do that.
I've added a connection string to my web.config
<
add name="OracleConnectionString" connectionString="Data Source=dbname;Persist Security Info=True;User ID=***;Password=***;Unicode=True" providerName="System.Data.OracleClient"/>
The next step is to add the data provider:
<
add name="OracleDataProvider" type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider" connectionStringName="OracleConnectionString" upgradeConnectionString="" providerPath="~\Providers\DataProviders\SqlDataProvider\" objectQualifier="" />
The crossed-out parts are parts that I know need to be changed, but I don't know how to change them.
That's where problems begin for me. DNN has a class called Provider.Sqldataprovider (I guess it's THE data provider for the framework). I understand that it implements all of the portal functions (getModules, getPortals, etc, etc, etc). Does it also implement the actual methods to make a connection to the database? How does that class correspond to the data providers that we write for each individual module? I can't for the life of me figure out where the link between them.
Also, and more importantly, this DotNetNuke.SqlDataProvider class is specified as the data provider type for the default data provider in web.config. Therefore, if I write the OracleDataProvider for my module, and then want to make it work, I have no idea how to hook it up in web.config (i.e. what do I use as the type). Provider path is another mystery for me.
I hope I was able to convey the roots of my issues, and I'll apreciate and pointers to any resources that would help me learn this subject.
George