"Chris Botha" <ch*************@hotmail.com> wrote in message
news:eQ*************@TK2MSFTNGP04.phx.gbl...
Hi, sorry, cross-post with the ADONET newsgroup.
I have a web site on a 2003 server. The web site runs under Framework
1.1 and works with oracle, no problem.
On the same server I have another web site that runs under Framework 2.0
and
connects to the same Oracle database, same connection string. In this case
I
get the following error:
ORA-12154: TNS:could not resolve service name
Thanks
I'm using the .Net 2.0 Framework and Oracle 10g. This works for me :
C# code:
----------
using Oracle.DataAccess.Client;
OracleConnection foodConnQ = new OracleConnection("Persist Security
Info=True;User ID=monte;Password=zsdccc;Data Source=epicur;");
OracleDataAdapter ingr1DAq = new OracleDataAdapter("SELECT * FROM v2 where
NDB_No = :NDB_No", foodConnQ);
ingr1DAq.SelectCommand = new OracleCommand("SELECT * FROM v2 where NDB_No =
:NDB_No", foodConnQ);
my local tnsnames file:
----------------------
# tnsnames.ora Network Configuration File:
C:\oracle\product\10.1.0\Client_1\network\admin\tn snames.ora
# Generated by Oracle configuration tools.
EPICUR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = monteamd)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = epicur)
)
)
-Fred