日期:2014-05-17 浏览次数:20996 次
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=c:\\temp\\txl.mdb");
con.Open();
string sql = "select * from stuff";
OleDbDataAdapter da = new OleDbDataAdapter(sql, con);
DataSet ds = new DataSet();
da.Fill(ds, "stuff");//填充到ds
GridView1.DataSource = ds.Tables["stuff"];