Link to home
Start Free TrialLog in
Avatar of sdlangers
sdlangers

asked on

Connect to oracle from asp fails

Hi,

I am trying to connect to oracle from asp using the exact same connection string that i use from a vb exe.

the vb connection works perfectly.

however, the asp returns the following error..

Microsoft OLE DB Provider for Oracle (0x80004005)
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.

the code is as follows and as i said, it works fine from vb:

Dim conn
   
    Set conn = server.CreateObject("ADODB.Connection")
       
    conn.open "Provider=MSDAORA.1;Password=mypass;User ID=myuser;Data Source=myoracledb;Persist Security Info=True"
     
    response.Write conn.State
   
    conn.Close
   
    Set conn = Nothing

Avatar of Pontis
Pontis

Did you install the Oracle client software on the machine where you run your asp? Looks like you didn't

Pontis
Where do yo run VB to connect the db ? Is it on the same node ?

You  need to install Oracle client and configure the tnsnames.ora file. It has an entry like:

aaa=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS =
          (PROTOCOL = TCP)
          (HOST = ....)
          (PORT = 1521)
      )
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ...)
    )
  )

then create a myoracledb data source using the aaa connection above
Avatar of sdlangers

ASKER

pontis - yes, oracle client is installed - thats why the vb connection works

baonguyen1 - yes- the vb is on the same machine and it works fine

oracle client is installed correctly - i can access the db no problem through sql plus, vb, etc - just not asp.  so im thinking its some permission problem with the asp user account?  or perhaps an iis setting?

ok - i found it myself.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;255084

number 9 and 10 did the trick.

hope this helps someone else
sdlangers has requested a refund since the problem was solved by the asker.

If no one objects, points will be refunded & question will be PAQd.

coreybryant
ASKER CERTIFIED SOLUTION
Avatar of Lunchy
Lunchy
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial