Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,
I have installed Oracle 10g in my windows 7 64 bit, here i am able to connect with sql plus successfully using user name : test, password : test, and host string : test but when i am trying to connect in my visual studio 2010 using connection string :
Data Source=test;user id=test;password:test;

but it is not able to connect, it is giving error :
ORA-12154: TNS: could not resolve the connect identifier specified.

Even i tried using Data Source:(Host, port,etc)(coppied from transname.ora file) in this case i am getting error :
ORA-06413: Connection not open.

I have wasted 3-4 days but i am not able to connect, so friend could you please help me.

Thanks
Raviranjan
Posted
Updated 21-Nov-13 20:36pm
v3
Comments
Ashish Bhujbal 22-Nov-13 1:42am    
Have a look at http://www.codeproject.com/Articles/18692/Instant-Oracle-Using-C
This may resolve your problem
Maciej Los 22-Nov-13 2:37am    
Improve question and paste your code ;)
Hamassss 22-Nov-13 4:35am    
Did u open ur connection? connection.Open() on oracleconnection object with correct connection string
Raviranjan_Kumar_Sinha 22-Nov-13 4:41am    
Hi Hamasss,
Yes, I am opening using connection.open and i am getting error there only, let me know if you can help me regarding this?

Thanks
Raviranjan
Hamassss 22-Nov-13 4:45am    
can u give code sample of that OraConnection ? u just wrote error.
I done few smaller projects using oracle DB and Toad but with info u gave i can only guess ur conection string is not ok

1 solution

Did you set Data source for your DB in Data Sources (ODBC) on your machine ? With chosen drivers and DB location path on your pc ?
Start --> Control Panel --> Administrative tools --> Data Sources (ODBC) then you need to add data source with chosen Oracle drivers and name it "test" and put source to your DB on your disk.
Then you can call connection using Data Source in connection string.
 
Share this answer
 
v2
Comments
Maciej Los 22-Nov-13 5:15am    
+5!
Nelek 22-Nov-13 5:22am    
Nice answer. Just one advice, please avoid "sms-chat" abbreviations

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