Click here to Skip to main content
15,878,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,
I want to connect Oracle data base with c#. I have added the needed references...like oracle.dataaccess.dll.
Now when I want to add new connection, I chose data source name =Oracle Database(OracleClient),
Srever name=XE
username
pass
when I try to test the connection, it gives an error as
"ORA-12154: TNS:could not resolve the connect identifier specified."

how to solve this problem?
I also tried using localhost:1521 as server name but it didn't work.
help need.

thank you.
Posted
Comments
PIEBALDconsult 10-Oct-15 16:25pm    
Are you sure that the XE entry in your TNSnames file is correct?
Zoltán Zörgő 10-Oct-15 16:35pm    
can you connect with any client?
Sreekanth Mothukuru 11-Oct-15 0:36am    
Have you tried to connect using Visual Studio "Server Explorer" to connect to the Oracle database? Also, try to connect to the database using an .UDL file and grab the connection string from it.
aditya a jadhav 11-Oct-15 11:12am    
Yes, I have used Server Explorer , but still it gives the TNS error, can you explain about .UDL file method...
Sreekanth Mothukuru 12-Oct-15 2:31am    
Udl is a simple text file saved with the type ".udl". It can be used to grab connection string to any DB. All we need to do is just open and connect to the required DB and upon successful connection close it and then open it with notepad to view connection string. Use the same connection string to place it in web.config file.

1 solution

 
Share this answer
 

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