无法在Windows 7 64位中从Visual Studio 2010连接Oracle [英] Not able to connect Oracle from visual studio 2010 in windows 7 64 bit

查看:71
本文介绍了无法在Windows 7 64位中从Visual Studio 2010连接Oracle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,

我已经在Windows 7 64位中安装了Oracle 10g,这里我可以使用用户名成功连接sql plus:test,password:test和host string:测试但是当我尝试使用连接字符串在我的visual studio 2010中连接时:

数据源=测试;用户id =测试;密码:测试; 



但它无法连接,它给出错误:

 ORA-12154:TNS:无法解析指定的连接标识符。



即使我尝试使用数据源:(主机,端口等)(从transname.ora文件中删除)在这种情况下我收到错误:

 ORA-06413:连接未打开。



我浪费了3-4天,但我不是能够连接,所以朋友可以帮助我。



谢谢

Raviranjan

解决方案

您是否在计算机的数据源(ODBC)中为数据库设置了数据源?在您的电脑上选择驱动程序和数据库位置路径?

开始 - >控制面板 - >管理工具 - >然后,您需要使用所选的Oracle驱动程序添加数据源并将其命名为test并将源代码放入磁盘上的数据库。

然后,您可以使用数据源连接来调用连接字符串。

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

解决方案

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.


这篇关于无法在Windows 7 64位中从Visual Studio 2010连接Oracle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆