Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: C# / ODP for .NET / Oracle 10g DB

Re: C# / ODP for .NET / Oracle 10g DB

From: ppcdev <ppcdev_at_hotmail.com>
Date: 1 Mar 2005 14:54:00 -0800
Message-ID: <2fa5f3a9.0503011454.50551d1f@posting.google.com>


microcode2004_at_hotmail.com (mcode) wrote in message news:<480bd64a.0503010555.7cf03603_at_posting.google.com>...
> Hi
>
> I've installed the Oracle Data Provider for .NET
>
> I can connect to the remote database with sqlplus
>
> I can connect to the remote database through ODBC data sources, and I
> have added a data source for this remote database
>
> While trying to connect with C# in VS.NET I always have error
> TNS-12154
>
> I checked the TNSNAMES.ORA file on client machine
>
> I rebuilt the TNSNAMES.ORA file from Oracle net manager
>
> I tried odbc user data source for DSN
>
> I tried odbc system data source for DSN
>
> But this error is still here...
>
>
> C# code :
>
> string constr = "User Id=master;Password=mox477uirvk4vk;Data
> Source=orcl";
> OracleConnection con = new OracleConnection(constr);
> con.Open();
> Console.WriteLine("Connected to database!");
>
>
>
>
>
> Thanks if anyone can help :)

don't use the odbc dsn.
instead erase all data in tnsnames.ora
and recreate the connection from net manager Received on Tue Mar 01 2005 - 16:54:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US