using System.Data;
using System.Data.OleDb;

 

OleDbConnection conn = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" +System.Web.HttpContext.Current.Server.MapPath("~/app_data/data.mdb"));
        conn.Open();
        OleDbCommand comm = new OleDbCommand("select * from b_articles where Cid=18",conn);
        OleDbDataAdapter da = new OleDbDataAdapter(comm);
        DataSet ds = new DataSet();
        da.Fill(ds, "product");
        data_articles.DataSource = ds.Tables["product"].DefaultView;
        data_articles.DataBind();

 posted on 2010-12-10 17:30  ddxgc  阅读(170)  评论(0编辑  收藏  举报