Results 1 to 4 of 4

Thread: 2 Questions ..[Resolved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342

    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

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342

    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

  3. #3
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126
    where can you get the .net dataprovider for oracle
    "All those who wonder are not lost" -j.r.r tolkien

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342
    ksm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width