I've always used datagridview with local ms access db, without any troubles.
I've been asked to create a solution, so that users can select, add, delete data from one table. The problem is that the path to this db is not the same for everyone.
I'm using this:
Dim con As New OleDbConnection
Public Sub Get_Connection()
con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source = " & My.Settings.BDpath
Public Sub DisplayDataGrid()
Dim lista As New Form3
Dim ds As New DataSet
Dim dt As New DataTable
Dim da As New OleDbDataAdapter
Dim cmd As String
cmd = "Select * From Registo;"
da = New OleDbDataAdapter(cmd, con)
lista.DataGridView1.DataSource = dt.DefaultView
my.settings.bdpath text is = "C:\Users\fcosta\Desktop"
i've set it to run when form is loaded, but i can't get it to work.
Public Class Form3
Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
What I have tried:
I've pretty much read the first two pages of google relationed with datagridviews and still, can't get it to work.