请问c#与Access建立连接时,出现“未在本地计算机上Miscrosoft.Jet.OLEDB.4.0”,怎么办,是32位机,
StringConnectString="Provider=Microsoft.Jet.OLEDB.4.0";ConnectString+="DataSource=Dat...
String ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0";
ConnectString+="Data Source=Database1.accdb";
String SQLString="select*from[sheet1$]";
System.Data.OleDb.OleDbConnection OleDBConn1 = new System.Data.OleDb.OleDbConnection(ConnectString);
DataSet DataSet1 = new DataSet();
System.Data.OleDb.OleDbDataAdapter OleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter(SQLString,OleDBConn1);
OleDBConn1.Open();
OleDbDataAdapter1.Fill(DataSet1);
很急啊,今晚就要做好,麻烦了,万分感谢 展开
ConnectString+="Data Source=Database1.accdb";
String SQLString="select*from[sheet1$]";
System.Data.OleDb.OleDbConnection OleDBConn1 = new System.Data.OleDb.OleDbConnection(ConnectString);
DataSet DataSet1 = new DataSet();
System.Data.OleDb.OleDbDataAdapter OleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter(SQLString,OleDBConn1);
OleDBConn1.Open();
OleDbDataAdapter1.Fill(DataSet1);
很急啊,今晚就要做好,麻烦了,万分感谢 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询