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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to connect my Cutum Module to Oracle as my DNN DB is in Sql ServerHow to connect my Cutum Module to Oracle as my DNN DB is in Sql Server
Previous
 
Next
New Post
9/18/2008 7:55 AM
 

Hi


I am using dotnetnuke 4.08.04 , Asp.net 2.0 and SqlServer 2000 as backend for DNN

How to  created Custum module which uses Oracle and my Dnn still uses SqlServer 

I am new to Dotnetnuke I have created as follows . It works , but is there any other process to connect to oracle for particular custum module ,

  step1  : I have created Simple Dynamic Dotnetnuke Module 

  step 2 : I had added class file OracleDataProvider that inherits from DataProvider ( similar to SqlDataProvider )

  step 3 : Inside OracleDataProvider I had overrided DataProviders Procedures and functions as follows

                Public Overrides Function GetData(ByVal con As String, ByVal query As String) As DataSet
                         Dim conn As New OleDbConnection(con)
                         Dim cmd As New OleDbCommand(query, conn)
                          Dim da As New OleDbDataAdapter(cmd)
                          Dim ds As New DataSet()
                         Try
                              conn.Open()
                              da.Fill(ds, "Emp")
                          Catch
                                ds = Nothing
                          Finally
                             conn.Close()
                         End Try
                       Return ds
               End Function   

    step 4 : In DataProvider class   inside procedure  CreateProvider  , instead of

                           objProvider = CType(Framework.Reflection.CreateObject("data", "TIS.Modules.Ratting", ""), DataProvider)

                   I replaced following code

                 Private Shared Sub CreateProvider()
                       If objProvider Is Nothing Then
                             objProvider = New Rating.OracleDataProvider
                        End If
                End Sub

     Step 5 : Remaining as routine . This works fine , but I myself was not much pleased in this process

  So please let me know Is there any alternative process to connect oracle for custum module , but still Dnn uses Sqlserver as backend

 
New Post
9/19/2008 1:13 AM
 

i think this link (http://www.adefwebserver.com/DotNetNukeHELP/DAL_and_DAL_Plus/Alternate_Database.htm) maybe help for you .

beacause it had help for me. but I was also not much pleased in this document.

i want to know how to use "sqldataprovider...."      to connect my custom database....

but i can not success for this idea.

first ,i write web.config

        <data defaultProvider="SqlDataProvider">
            <providers>
                <clear/>
                <add name="SqlDataProvider" type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider" connectionStringName="SiteSqlServer" upgradeConnectionString="" providerPath="~\Providers\DataProviders\SqlDataProvider\" objectQualifier="" databaseOwner="dbo"/>
                <add name="ASASqlDataProvider" type="YourCompany.VTest.Components.Data.SqlDataProvider, YourCompany.VTest.Components.SqlDataProvider" connectionStringName="OdbcDataProvider" upgradeConnectionString="" providerPath="" objectQualifier="" databaseOwner="dbo"/>
            </providers>
        </data>

secend ,i modify sqldataprovider.cs

        /// </summary>
        public SqlDataProvider()
        {
            Provider provider = (Provider)providerConfiguration.Providers["ASASqlDataProvider"];
            connectionString = DotNetNuke.Common.Utilities.Config.GetConnectionString();

............

but i can't success .

i don't know what i loss to modify....

 

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to connect my Cutum Module to Oracle as my DNN DB is in Sql ServerHow to connect my Cutum Module to Oracle as my DNN DB is in Sql Server


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