Oracle Database - Problem in connecting database with C#

Asked By MARKAND BHATT on 26-Mar-13 07:40 AM
I used following code to connect oracle database from C#.
But i get this error "invalid login credentials"

1.using (Oracle.DataAccess.Client.OracleConnection cn = new Oracle.DataAccess.Client.OracleConnection("Data Source=abcSource;User Id=abcUserId;Password=abcPassword;"));
3.  cn.Open();

While if i try following code to connect database from C# I succeed.

1.using (System.Data.OracleClient.OracleConnection cn = new System.Data.OracleClient.OracleConnection("Data Source=abcSource;User Id=abcUserId;Password=abcPassword;"));
3.   cn.Open();

I dont understand, what is happening
Please! Can anyone help me

Tom Wilson replied to MARKAND BHATT on 26-Mar-13 09:23 AM
Do you have the TNSNAMES.ORA file?  Look at for an Oracle connection string without the TNSNAMES.ORA file.
MARKAND BHATT replied to Tom Wilson on 26-Mar-13 09:43 AM
Yes, I have the tnsnames.ora file
Tom Wilson replied to MARKAND BHATT on 26-Mar-13 09:57 AM
Does the tnsnames.ora file have the abcSource defined?  You can open this file with any text editor such as notepad.
Tom Wilson replied to MARKAND BHATT on 26-Mar-13 10:36 AM
Which version of the Oracle Database and ODP are you using.  Oracle 11g has case sensitive passwords and previous versions did not.  If you are using ODP version 10... with Oracle 11, then that's a problem.