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

From: Chris <newsgroup.replies_at_netchris.com>
Date: 6 Jan 2004 08:24:48 -0800
Message-ID: <20094607.0401060824.7a03d374_at_posting.google.com>


newsgroup.replies_at_netchris.com (Chris) wrote in message news:<20094607.0401051455.287c7e57_at_posting.google.com>...
> 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, now I have a little more info on this. This issue only arises when debugging in VS.NET. When stepping through code, at the connection.Open() method call, the error occurs. However, when the executable is run without being debugged, it runs fine. Is this documented? Received on Tue Jan 06 2004 - 17:24:48 CET

Original text of this message