.NETGURU
Connecting To Oracle Source
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oracle' list.


Nauman
-- Moved from [aspngstart] to [ngfx-oracle] by Let the good times roll <Click here to reveal e-mail address> --

Dear Friends

I am trying to link my ASP.Net code with Oracle Database 9i. I have worked
with Sql Server but it has some problem with Oracle.
Plz send me the connection code or a sample so that i can solve the problem

Thanks.

Syed Nauman Aqeel
ASP.Net Developer
MagsNet

Reply to this message...
 
    
Daesuin O'Dhonnacahda
Good morning,

Here's our code:

'#### Returns the connection string to be used in this application ####
Friend Function ConnectionStr() As String
Return "Provider=MSDAORA.1;Password=YourPW;User ID=YourUserID;Data Source=YourSource" '#### Microsofts Oracle ODBC driver ####
' Return "Provider=OraOLEDB.Oracle.1;Password=YourPW;User ID=YourUserID;Data Source=YourSource" '#### Oracles ODBC Driver ####
'Return "User ID=YourUserID;Password=YourPW;Data Source=YourSource" '#### Oracles ODP Driver ####
End Function

'#### Make Requested DB Connections ####
Private Function Do_DBConnections(ByVal SQL As String, ByVal strWhichDV As String) As Boolean
Dim blnAnswer As Boolean = False
Dim Connection As New OleDbConnection(ConnectionStr())
Dim Adapter As New OleDbDataAdapter(SQL, Connection)
Dim strResponse As String = ""

Try
Select Case strWhichDV
Case "Tasks"
Adapter.Fill(DataSet, "TBL_Tasks")
Case "GMDOrders"
Adapter.Fill(DataSet, "TBL_GMDOrders")
End Select
Connection.Open()
Select Case strWhichDV
Case "Tasks"
dvTasks.Table = DataSet.Tables("TBL_Tasks")
If (dvTasks.Table.Rows.Count > 0) Then
dvTasks.Table.Clear()
End If
Adapter.Fill(DataSet, "TBL_Tasks")
dvTasks.Table = DataSet.Tables("TBL_Tasks")
dvTasks.Sort = ("TS_IMPLVLNUM, " + mstrTask_SortOrder + mstrTask_IndexDir)
mdTask_MaxRecs = DataSet.Tables("TBL_Tasks").Rows.Count.ToString()
If (mdTask_CurrRecs <= 0) Then mdTask_CurrRecs = 0
Do_SaveSession()
With dbg_Tasks
.DataSource = dvTasks
.AllowSorting = True
.Columns(1).SortExpression = "TS_IMPLVL"
.Columns(2).SortExpression = "NumOf"
.Columns(3).SortExpression = "Dated"
If (.CurrentPageIndex <= 0) Then .CurrentPageIndex = 0
.DataBind()
Dim Xidx As Integer = 0
For Xidx = 0 To (.Items.Count - 1) Step 1
.Items(Xidx).BackColor = System.Drawing.Color.Bisque
.Items(Xidx).Font.Bold = False
Next Xidx
.Items(0).BackColor = System.Drawing.Color.Teal
.Items(0).Font.Bold = True
End With
Case "GMDOrders"
dvGMDOrders.Table = DataSet.Tables("TBL_GMDOrders")
If (dvGMDOrders.Table.Rows.Count > 0) Then
dvGMDOrders.Table.Clear()
End If
Adapter.Fill(DataSet, "TBL_GMDOrders")
dvGMDOrders.Table = DataSet.Tables("TBL_GMDOrders")
dvGMDOrders.Sort = (mstrGMDO_SortOrder + mstrGMDO_IndexDir)
mdGMDO_MaxRecs = DataSet.Tables("TBL_GMDOrders").Rows.Count.ToString()
If (mdGMDO_CurrRecs <= 0) Then mdGMDO_CurrRecs = 0
Do_SaveSession()
With dbg_GMDOrders
.DataSource = dvGMDOrders
.AllowSorting = True
.Columns(1).SortExpression = "OrderTypes"
.Columns(2).SortExpression = "Orders"
If (.CurrentPageIndex <= 0) Then .CurrentPageIndex = 0
.DataBind()
Dim Xidx As Integer = 0
For Xidx = 0 To (.Items.Count - 1) Step 1
.Items(Xidx).BackColor = System.Drawing.Color.Bisque
.Items(Xidx).Font.Bold = False
Next Xidx
.Items(0).BackColor = System.Drawing.Color.Teal
.Items(0).Font.Bold = True
End With
End Select
Connection.Close()
Connection.Dispose()
Adapter.Dispose()
Do_SaveSession()
blnAnswer = True
Catch
strResponse = Err.Description
'#### Show Error Dialog ####

Connection.Close()
Connection.Dispose()
Adapter.Dispose()
blnAnswer = False
End Try
Return blnAnswer
End Function

Hope it helps.

Deasun
----- Original Message -----
From: "Nauman" <Click here to reveal e-mail address>
Date: Tue, 30 Jul 2002 16:46:16 +0500
To: "ngfx-oracle" <Click here to reveal e-mail address>
Subject: [ngfx-oracle] Connecting To Oracle Source

-- Moved from [aspngstart] to [ngfx-oracle] by Let the good times roll <Click here to reveal e-mail address> --

Dear Friends

I am trying to link my ASP.Net code with Oracle Database 9i. I have worked
with Sql Server but it has some problem with Oracle.
Plz send me the connection code or a sample so that i can solve the problem

Thanks.

Syed Nauman Aqeel
ASP.Net Developer
MagsNet
| [ngfx-oracle] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oracle.asp = JOIN/QUIT

--
__________________________________________________________

Sign-up for your own FREE Personalized E-mail at Mail.com

http://www.mail.com/?sr=signup

Get 4 DVDs for $.49 cents! plus shipping & processing. Click to join.

http://adfarm.mediaplex.com/ad/ck/990-1736-3566-59

Reply to this message...
 
    
Srinivasa Sivakumar
Try this URL

Using .NET Framework Data Provider for Oracle to Improve .NET Application
Performance
http://www.msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotne
t/html/ManProOracPerf.asp

----- Original Message -----
From: "Nauman" <Click here to reveal e-mail address>
To: "ngfx-oracle" <Click here to reveal e-mail address>
Sent: Tuesday, July 30, 2002 6:46 AM
Subject: [ngfx-oracle] Connecting To Oracle Source

> -- Moved from [aspngstart] to [ngfx-oracle] by Let the good times roll
<Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
 
System.Data.DataSet
System.Data.OleDb.OleDbConnection
System.Data.OleDb.OleDbDataAdapter
System.Drawing.Color
System.Windows.Forms.SortOrder




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification