|
-
Oct 29th, 2002, 01:13 PM
#1
Thread Starter
Hyperactive Member
2 Questions ..[Resolved]
i) can anyone pl guide me how to connect to oracle databse .. in ASP.NET ..
ii)and i also wanted to get the data in a ADO recordset and fill the Grid with that recordset..
thanx in advance
Last edited by Kunchesm; Oct 30th, 2002 at 02:19 PM.
ksm
-
Oct 30th, 2002, 02:18 PM
#2
Thread Starter
Hyperactive Member
this is wht i could find out..
=====================================
1) Connecting to Oracle Database
=====================================
(a) Download and install 'OracleClient' a .Net provider for connecting to oracle
(b) Import System.Data.OracleClient Namespace
(c) Oracle Connection is similar to any other connections
Dim str as String = "Password=tiger;User ID=scott;Data Source=mydb;"
Dim conn as OracleConnection = New OracleConnection(str)
Dim cmd as OracleCommand = New OracleCommand(mySql, conn)
conn.Open()
.....
....
conn.Close()
=====================================
2) Using ADO Recordsets
=====================================
Imports ADODB
Imports System.Data.OleDb
Dim rsFillSource As New ADODB.Recordset
Dim DataTarget As New DataTable("OldADORecordSetData")
rsFillSource.Open("SELECT * FROM SomeTable", "<provider connection string here>", CursorTypeEnum.adOpenForwardOnly)
Try
Dim dbAdapter As New OleDbDataAdapter()
dbAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
dbAdapter.Fill(DataTarget, rsFillSource)
Finally
rsFillSource.Close()
End Try
=====================================
Last edited by Kunchesm; Oct 30th, 2002 at 02:27 PM.
ksm
-
Nov 4th, 2002, 04:14 PM
#3
Lively Member
where can you get the .net dataprovider for oracle
"All those who wonder are not lost" -j.r.r tolkien
-
Nov 5th, 2002, 02:26 PM
#4
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|