时间:2021-07-01 10:21:17 帮助过:2人阅读
<span style="font-size:12px;"> string path = @"E:\Users\PanLee\Desktop\Access .accdb"; OleDbConnection oleDbConnection = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.15.0;data source=" + path); oleDbConnection.Open(); string sql = "select * from Student"; OleDbDataAdapter oleDbDataAdapter = new OleDbDataAdapter(sql, oleDbConnection); DataTable dataTable = new DataTable(); oleDbDataAdapter.Fill(dataTable); dataGridView1.DataSource = dataTable;</span>
版权声明:本文为博主原创文章,未经博主允许不得转载。
C# Access
标签: