프로그래밍언어/VB.NET

VB.NET 엑세스파일 읽기 accdb

부산딸랑이 2014. 6. 25. 23:03

Dim conn As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=database1.accdb"
Dim cmd As String = "Select * from Table1"
Dim adapter As New OleDbDataAdapter(cmd, conn)
Dim topics As New DataSet
adapter.Fill(topics)
DataGridView1.DataSource = topics.Tables(0)