I'm trying to populate a DataGridView with the values from a .accdb database. The problem I'm having is that although 3 rows are made in the DataGridView as there are 3 in the database, all of the values are blank.
Code:
Dim con As New OleDbConnection With {.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Ricky\Desktop\Permissions.accdb"}
Private Sub loadPermissions()
con.Open()
Dim da As OleDbDataAdapter
Dim ds As DataSet
Dim tables As DataTableCollection
Dim source1 As New BindingSource
ds = New DataSet
tables = ds.Tables
da = New OleDbDataAdapter("SELECT * FROM [Permissions]", con)
da.Fill(ds, "Permissions")
Dim view As New DataView(tables(0))
source1.DataSource = view
DataGridView1.DataSource = view
con.Close()
End Sub
Any help would be greatly appreciated.
-Rixterz

New Topic/Question
Reply


MultiQuote








|