OleDbConnection();
OleDbDataAdapter adapter= null;//ConnectiongString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="//+ Path + ";Extended Properties=‘Excel 8.0;HDR=no;IMEX=0‘";
ConnectiongString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
+ Path + ";Persist Security Info=False";
Connection.ConnectionString=ConnectiongString;
Connection.Open();//adapter = new OleDbDataAdapter("SELECT * FROM [MAP仓库库存$] ",//Connection);
adapter = new OleDbDataAdapter("SELECT * FROM SunData",
Connection);
dtTable= newDataTable();
DataSet DataSet1= newDataSet();
adapter.Fill(DataSet1);
dtTable= DataSet1.Tables[0];
ado ole方式访问access的两种方式
标签:dataset hdr ase open 4.0 div bsp pen info
本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉 本文系统来源:http://www.cnblogs.com/ChineseMoonGod/p/6748636.html