引用Oracle.ManagedDataAccess.dll,文件下载后vs中添加引用即可
using Oracle.ManagedDataAccess.Client;
private readonly string strConnection = @"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=数据库名称))); Persist Security Info=True;User ID = sa; Password=123456;";
1