当前位置: 代码迷 >> ASP.NET >> .net怎么连接oracle10g
  详细解决方案

.net怎么连接oracle10g

热度:6895   发布时间:2013-02-25 00:00:00.0
.net如何连接oracle10g
如题,费了一晚上,也没弄成功。

------解决方案--------------------------------------------------------
UP
------解决方案--------------------------------------------------------
右击网站,添加引用>System.Data.OracleClient;
再using System.Data.OracleClient;
跟着就基本与SQL SERVER类似了,只是基本都是对Oracle开着的类.
------解决方案--------------------------------------------------------
没用过Oracle
------解决方案--------------------------------------------------------
首先要安装好Oracle10g的Client和Services

然后使用Client连接上Services.

SID号和IP要设置好,用户名和密码也要设置正确.

连上Services后,,右击网站,添加引用> System.Data.OracleClient; 

在webconfig文件中建立连接字符串

XML code
<add name="OraConnString1" connectionString="Data Source=数据库名;User Id=你的用户名;Password=你的密码;" providerName="System.Data.OracleClient"/>
  相关解决方案