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();

相关文章:

  • 2021-08-11
  • 2022-02-13
  • 2021-07-16
  • 2021-11-18
  • 2021-12-10
  • 2021-12-21
  • 2021-08-22
猜你喜欢
  • 2021-11-13
  • 2021-09-12
  • 2021-05-19
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案