Oracle Connection

Results 1 to 3 of 3

Thread: Oracle Connection

  1. #1
    wex_69 Guest

    Default Oracle Connection

    Two Servers. Web server with ASP app. Server with Oracle DB.<BR>Set up systems DSN on web server to point to the Oracle DB. All I need to do now is write the connection object code and recordset for that connection object so that I can query the db. Has anyone got some sample code for me. BTW I have user name pword for the oracle account. Please help this is pretty urgent. thanks,<BR>wex_69

  2. #2
    Join Date
    Dec 1969

    Default RE: Oracle Connection

    Set Conn=Server.CreateObject("ADODB.Connection")<BR>Co nn.Open "Dsnname","Userid","password"<BR>Set Rs=Conn.Execute("Select * from abc")<BR>Response.write Rs(0)

  3. #3
    Prescott Chartier Guest

    Default RE: Oracle Connection

    &#039; Create the appropriate objects (assumes MDAC v2.1 or greater <BR>&#039; on the server)<BR><BR>Dim oracon As New ADODB.Connection<BR>Dim ADOTable As New Recordset<BR><BR>&#039;connect to the database (DNS-less connection, text wrapped for readability)<BR><BR>oracon.ConnectionString = "Provider=OraOLEDB.Oracle;DataSource=rsme;User ID=SOMEUSER;Password=SOMEPASSWORD;"<BR><BR>oracon. CursorLocation = adUseClient<BR>oracon.Mode = adModeReadWrite<BR>oracon.Open<BR><BR>&#039; Open table ...<BR><BR>ADOTable.Open "select * from sometable", oracon, adOpenDynamic, adLockOptimistic, adCmdText<BR><BR>&#039; This is VB Code, but basically the same (syntax will vary <BR>&#039; slightly) ..

Posting Permissions

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