第一种:采用 Oracle.ManagedDataAccess.Client.dll链接Oracle数据库
(1)、添加引用,如图所示
(2)连接测试
private void Test()
{
string conString = "User Id=user; password=pwd;" +
//EZ Connect Format is [hostname]:[port]/[service_name]
//Examine working TNSNAMES.ORA entries to find these values
"Data Source=10.23.1.111:1521/orcl; Pooling=false;";
{
string conString = "User Id=user; password=pwd;" +
//EZ Connect Format is [hostname]:[port]/[service_name]
//Examine working TNSNAMES.ORA entries to find these values
"Data Source=10.23.1.111:1521/orcl; Pooling=false;";
//Create a connection to Oracle
OracleConnection con = new OracleConnection();
con.ConnectionString = conString;
co
OracleConnection con = new OracleConnection();
con.ConnectionString = conString;
co