string strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d://temp//Weight.dll;Jet OLEDB:Database Password=www.54321.com;"; OleDbConnection m_con = new OleDbConnection(strCon); OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter("select * from ", m_con); try { m_con.Open(); MessageBox.Show("成功"); } catch (Exception) { MessageBox.Show("失败"); } da.SelectCommand.CommandText = "select * from T_Standard"; DataSet ds = new DataSet(); da.Fill(ds, "name"); dataGridView1.DataSource = ds.Tables[0];
access
最新推荐文章于 2022-07-22 16:34:59 发布