Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Data Provider ConfusionData Provider Confusion
Previous
 
Next
New Post
3/1/2006 4:41 PM
 

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

 
New Post
3/2/2006 8:52 AM
 

Without some custom work only on your end, the normal way to operate is one dataprovider per install. Although each module gets its dataprovider is programmed seperately for each module, the application as a whole only uses one. To have a module use a different one would require a connection string only for your module and you would have to code your module's dataprovider to use that connectionstring and not the one used by the core or other modules. This is going to be a problem if you have to do a join with other tables in your dnn database though.

 


Chris Paterra

Get direct answers to your questions in the Community Exchange.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Data Provider ConfusionData Provider Confusion


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out