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