Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: C# / ODP for .NET / Oracle 10g DB
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
![]() |
![]() |