Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Unable to connect through application
Jeevan wrote:
> Hi all,
>
> Thanks for your replies. I have checked everything, but still unable to
> connect. The situation is:
>
> When I try
> sqlplusw dgfc_owner/dgDTpswd_at_dev1 from command prompt, it connects.
> But when I try to use the following code to execute it gives the error
> "Error while trying to retrieve text for error ORA-12154"
>
> The code:
>
> string constr = @"Data Source='dev1';User
> ID='dgfc_owner';Password='dgDTpswd';Connection Lifetime='1';";
> try
> {
> mConn = new OracleConnection(constr);
>
> mConn.Open();
> }
> catch(Exception ex)
> {
> Response.Write(ex.Message);
> }
>
> Thanks and regards,
> Jeevan
Have you tried your connection string without using single quotes around the values? e.g. dev1 instead of 'dev1'.
Regards
/Rauf
Received on Mon Feb 27 2006 - 06:28:55 CST