Re: "ORA-12154: TNS:could not resolve service name" with Oracle Data Provider for .NET

From: Chris Simmons <newsgroup.replies_at_netchris.com>
Date: Wed, 07 Jan 2004 23:35:54 -0500
Message-ID: <0bnpvvcuvmifkjlcbo2v6sfo18417rv3ic_at_4ax.com>


[Quoted] On 5 Jan 2004 14:55:40 -0800, newsgroup.replies_at_netchris.com (Chris) wrote:

>I have installed Oracle Data Provider for .NET (9.2.0.4.0) and am
>trying to make a simple connection to a database. I can test connect
>fine with the Net Manager and have verified that my TNSNames.ora and
>SQLNET.ora files are non-duplicated. I am assuming that they are
>correct as I saved my configuration in Net Manager after testing the
>connection successfully.
>
>However, when attempting to connect from C#, I get an excpetion with
>the error:
>"ORA-12154: TNS:could not resolve service name"
>
>Same thing happens also when trying to use
>System.Data.OleDb.OleDbConnection as well.
>
>Can anyone steer me in the right direction of where to look first?

OK, more info. The path where my project lies (and therefore the bin\Debug directory is within a directory with parentheses in the name (e.g. "C:\My Documents\VS.NET Projects
(1.1)\Something\Here\bin\Debug"). Is this documented? It appears that ODP.NET will not resolve a service name in this directory. Place the test .exe in "C:\My Documents\VS.NET Projects\Something\Here\bin\Debug" (no parens) and the connection goes fine.

-- 
Thanks,
Chris Simmons
forensics_at_christophersimmons.org

*** IMPORTANT - DO NOT REPLY TO ABOVE E-MAIL ADDRESS ***
It exists solely as bait for spam.  If you wish to e-mail
me (and have me actually READ your e-mail), use the address
listed in the From: header.
Received on Thu Jan 08 2004 - 05:35:54 CET

Original text of this message