Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Re: Oracle error - ORA-12154: TNS:could not resolve service name


Message #1 by "Thomas G. Ward" <tward@r...> on Wed, 16 May 2001 17:50:26
> 

> Hello all.

> 

> Details are as follows:

> 

> Win2k /IIS 5 / Oracle8 (all on the same development box)

> 

> Set up service name and made a sucessful connection test using Net8 

> Assistant. Checked tnsnames.ora file and I can see the proper entry for 

> the service connection (ORCLDEV). However, when I run the ASP script I 

get 

> the following error:

> 

> Error Type:

> Microsoft OLE DB Provider for Oracle (0x80004005)

> ORA-12154: TNS:could not resolve service name 

> /dev/includes/ADOFunctions_inc.asp, line 10

> 

> 

> Source code is as follows:

> 

> Function OpenDB()

> 

> 	Dim objConnection

> 

> 	Set objConnection = Server.CreateObject("ADODB.Connection")

> 	With objConnection

> 	    .ConnectionString = "Provider=MSDAORA;Data Source=ORCLDEV; 

> User ID=super; Password=secret;"

> 	    .Open

> 	End With    

> 	Set OpenDB = objConnection

> End Function	

> 

> 

Rich,



I have been trying to create a connection to Oracle 8 using VS.NET.  The 

following is the connection string that was created by the ADOCONNECTION 

wizard.  I believe I did get the connection because the wizard displayed 

all the tables from the oracle database and allowed me to select tables 

and fields like you would expect.  However, I did recieve another error 

after this that I am still trying to track down.  I hope the string helps 

you see what might be wrong in you ADO app.



adoConnection2.ConnectionString = "Provider=MSDAORA.1;User ID=apps;

Data Source=TEST;

Persist Security Info=False";




  Return to Index