Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to connect to my oracle database using following connectionstring.

"Provider = OraOLEDB.Oracle;  User Id = <my id>; Password = <my password>;Data Source = <db schema name>";


But getting following error:
ORA-12154: TNS:could not resolve the connect identifier specified


Please let me know what should be correct connection string.

What I have tried:

I am trying to connect to my oracle database using following connectionstring.

<pre>"Provider = OraOLEDB.Oracle;  User Id = <my id>; Password = <my password>;Data Source = <db schema name>";
Posted
Updated 3-Aug-17 9:02am
Comments
ZurdoDev 3-Aug-17 10:45am    
Check out connectionstrings.com
Dave Kreskowiak 3-Aug-17 10:46am    
Is the "db schema name" defined in TNSNAMES.ORA? From the error message it doesn't sound like it.
virusstorm 3-Aug-17 13:12pm    
Your connection string is trying to use the OLE provider:
http://www.oracle.com/technetwork/database/windows/index-089115.html

This means you need to have the provider installed on any machine that the application will run on. As RyanDev said, check out https://www.connectionstrings.com/oracle/ for various ways to connect to an Oracle DB.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900