Reputation: 13
Dim ds As New DataSet
Dim dt As New DataTable
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
myConnection.Open()
da = New OleDbDataAdapter("select * from Products", myConnection)
da.Fill(dt)
datagridview1.DataSource = dt.DefaultView
Upvotes: 0
Views: 1025
Reputation: 83
Dim ds As New DataSet
Dim dt As New DataTable
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
myConnection.Open()
da = New OleDbDataAdapter("select column-name1, column-name2, column-name3, column-
name-n from Products", myConnection)
da.Fill(dt)
Hi, you can do a select not to all columns else a few columns and in the order that you want. I hope that this was what you were looking for, else only comment. Thank you very much and happy codding. :)
Upvotes: 1