时间:2021-07-01 10:21:17 帮助过:21人阅读
//using System.Data; //using System.Data.Common; ConnectionStringSettings aSett = System.Configuration.ConfigurationManager.ConnectionStrings["configedDB"]; DbProviderFactory aF = DbProviderFactories.GetFactory(aSett.ProviderName); DbConne
//using System.Data;
//using System.Data.Common;
ConnectionStringSettings aSett = System.Configuration.ConfigurationManager.ConnectionStrings["configedDB"];
DbProviderFactory aF = DbProviderFactories.GetFactory(aSett.ProviderName);
DbConnection aconn = aF.CreateConnection();
aconn.Open();