获取所有Access数据库中的名表方法

protected void Page_Load(object sender, EventArgs e)
{
OleDbConnection con
= new OleDbConnection("Provider = Microsoft.ACE.OLEDB.12.0; Data Source = |DataDirectory|/mm.accdb;");
con.Open();
DataTable dt
= con.GetSchema("tables");
GridView1.DataSource
= dt;
GridView1.DataBind();
}

以上方法测试通过。不过也有系统表的名称,还要再过滤,才能得到纯用户所建的表名

相关文章:

  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2021-07-28
  • 2022-01-01
猜你喜欢
  • 2021-10-15
  • 2022-12-23
  • 2021-11-04
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
相关资源
相似解决方案