标签:
数据库连接语句:
<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>
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/ilipan/article/details/47393213