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

From: Jeff <jeff_at_work.com>
Date: Thu, 08 Jan 2004 14:18:20 GMT
Message-ID: <btjord$sq4$1_at_cronkite.cc.uga.edu>


I have quite a lot of difficulty with this myself, but only with the IDE-- I usually have to reconfig the data adapter (without any real changes) to get connections to start working and then they're usually fine until I restart the IDE. My apps, however, never have a problem making the connection.

In article <0bnpvvcuvmifkjlcbo2v6sfo18417rv3ic_at_4ax.com>, Chris Simmons <newsgroup.replies_at_netchris.com> wrote:
>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.
>
Received on Thu Jan 08 2004 - 15:18:20 CET

Original text of this message