日期:2014-05-18 浏览次数:20437 次
OleDbConnection connection = new OleDbConnection(ConfigurationManager.AppSettings["sql"]); string sql = "select * from [SalesInfo]"; OleDbDataAdapter da = new OleDbDataAdapter(sql, connection); DataSet ds = new DataSet(); da.Fill(ds);
<appSettings> <add key="sql " value="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\SalesProjects\App_Data\1.accdb;Persist Security Info=True "/> </appSettings>