这是信任连接
string strConn = "Provider=SQLOLEDB;Data Source=(local)\\dev;" +
"Initial Catalog=Northwind;Trusted_Connection=Yes;";这是密码连接
Provider=SQLOLEDB;Data Source=MyServer;Initial Catalog=MyDatabase;
User ID=MyUID;Password=MyPassword;
string strConn = "Provider=SQLOLEDB;Data Source=(local)\\dev;" +
"Initial Catalog=Northwind;Trusted_Connection=Yes;";这是密码连接
Provider=SQLOLEDB;Data Source=MyServer;Initial Catalog=MyDatabase;
User ID=MyUID;Password=MyPassword;
“.Net Data OLE DB 提供程序 (System.Data.OleDb) 不支持 MSDASQL 提供程序(用于 ODBC 驱动程序的 Microsoft OLE DB 提供程序)。”为什么要用ODBC连接,用SQLClient连接SQLSERVER不更快吗,微软在里面做了很多的优化。