1 创建数据库连接对象 IDbConnection

//oracle版
//程序集 System.Data.OracleClient
using System.Data.OracleClient;
new OracleConnection(connectionString);

//SqlServer版
//程序集 System.Data
using System.Data.SqlClient;
new SqlConnection(connectionString);

//OleDb版
//程序集 System.Data
using System.Data.OleDb;
new OleDbConnection(connectionString);

//Odbc版
//程序集 System.Data
using System.Data.Odbc;
new OdbcConnection(connectionString);

  

原文地址:https://www.cnblogs.com/shenshiting/p/7743364.html