注:下载地址:http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html;
需注册用户,我下载的是:instantclient-basic-win32-10.2.0.4.zip)
2、添加注册表内容( 将以下内容保存到x.reg文件中,直接运行):(其内容如下,涉及到的文件位置的根据自己需要改)Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"LD_LIBRARY_PATH"="C:\\Oracle\\instantclient"
"TNS_ADMIN"="C:\\Oracle\\instantclient"
"NLS_LANG"="AMERICAN_AMERICA.ZHS16GBK"
3、添加环境变量(此步很重要,否则报System.Data.OracleClient requires Oracle client software version 8.1.7 or greater)
右键单击“我的电脑”-->“属性”-->“高级”-->“环境变量”-->“系统变量”-->选中“Path”-->“编辑”-->在“变量值”原来的数据后添加";C:\\Oracle\\instantclient"
4、如果要在数据库连接串中添加oracle的数据库连接方式,则不用此步。否则
添加tnsnames.ora文件(添加到C:\\Oracle\\instantclient文件中):