connection ASP - Oracle 7.3 via ODBC?

From: Cyrille Bonnet <NOSPAM_cbonnet_at_leopard.com>
Date: 1998/04/08
Message-ID: <352BBCF3.81183392_at_leopard.com>#1/1


[Quoted] [Quoted] I'm trying to use ASP to connect to an Oracle 7.3 database. I'm running Oracle client and IIS4 on a NT Server, and Oracle 7.3.2.2.0 on a Sun Solaris 2.5.1.

A connection to a local Access database works fine (same ASP code), and I can connect to my Oracle database via SQLPlus form the NT Server.

Both the Microsoft and the Oracle drivers failed to work (see below for the exact error messages), so here are my questions:

  • Did somenone get these ODBC drivers to work with Oracle 7.3?
  • where are you supposed to specify the Oracle service name you want to use in ODBC? I found the DSN, user name, password, but the service name??? In other words, how does Oracle know which service to use?
  • Oracle driver version 1.15.0301 gives me the error message:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Oracle][ODBC Oracle Driver]Connection not open.

*Microsoft driver version 2.73.728303 results in:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve service name

Here's my ASP code:

Set DataConn = Server.CreateObject("ADODB.Connection") Set Session("ConnObj") = DataConn
DataConn.ConnectionTimeout = 30
ConnString="DSN=test;UID=scott;PWD=tiger" DataConn.Open(ConnString)
Set DataCmd = Server.CreateObject("ADODB.Command") DataCmd.CommandText = "Select * from emp;"

My Tnsnames.ora on the PC includes (I used Easy SQL*Net config to configure this file):

test.world =
  (DESCRIPTION =
    (ADDRESS_LIST =

        (ADDRESS =

(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = blabla)
(Port = 1521)
) (ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = blabla)
(Port = 1526)
)

    )
    (CONNECT_DATA = (SID = WG73)
    )
  ) Received on Wed Apr 08 1998 - 00:00:00 CEST

Original text of this message