Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    suu
    suu is offline
    New Coder
    Join Date
    Jan 2004
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Connecting to a Oracle DB using ASP

    Hello!

    I've never done this so i'm gonna need your help. I've always connected to an Access DB much like this:
    ----------------------------------------------------------
    Set Conn = Server.CreateObject("ADODB.Connection")
    conn.open "Provider=Microsoft.Jet.OLEDB.4.0;" &_
    "Data Source=\\Sacavem07\intranet\BD_CA.mdb;" &_
    "User Id=admin;" &_
    "Password="
    Set RS = Server.CreateObject("ADODB.Recordset")
    strSQL = "SELECT * FROM TBL_0IndicRel"
    RS.Open strSQL,Conn,1,2
    ------------------------------------------------------------

    Is there a way to connect to an ORACLE DB much like this? I would prefer not to use a ODBC. And how does a person do a select? Does it work the same way?

    We're working with SAP 8.7 or something like that so the Oracle DB must be also version 8 right? i confess i'm guessing here.

    I found this piece of code but it's not working:
    ------------------------------------------------------------
    Set Conn = Server.CreateObject("ADODB.Connection")
    conn.open "Provider=OraOLEDB.Oracle;" &_
    "Data Source=172.16.7.201/P51;" &_
    "User Id=admin;" &_
    "Password="
    --------------------------------------------------------------

    Thank you!

  • #2
    suu
    suu is offline
    New Coder
    Join Date
    Jan 2004
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the Oracle version is 8.7.1

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #4
    suu
    suu is offline
    New Coder
    Join Date
    Jan 2004
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i'm really new at this. i've never done a Oracle connection and i've already searched several sites.

    what i have is this:
    -------------------------------------------------------
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "Provider=MSDAORA;Data Source=172.16.7.201/P51;
    User Id=EQOBRAS;Password=serbiqe"
    -------------------------------------------------------

    it doesn't work. it returns the error:

    ----------------------------------------------------------
    Microsoft OLE DB Provider for Oracle error '80004005'

    Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed.
    ----------------------------------------------------------

    i don't understand. what more does it need?

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    There's a note in the link I posted, that says:

    Note: "Data Source=" must be set to the appropriate Net8 name which is known to the naming method in use. For example, for Local Naming, it is the alias in the tnsnames.ora file; for Oracle Names, it is the Net8 Service Name.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #6
    suu
    suu is offline
    New Coder
    Join Date
    Jan 2004
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    huh?!

    i'm really not understanding you.

    i'm really not getting what you're saying.

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Actually, I haven't work with Oracle before. I was just giving you possible clues for the solution. I noticed that you used an IP address/something for Data Source, which I think is different from that of the link I posted.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

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