I have a problem with retrieving data from access databse.
I make the connection and retrieve the data no problem. But when the data changes from another use of the database, I cannot get the new changed data without reloading the complete programme. Even repeating the load functions does not renew the data from the access data base.
Here is what I have got:
Public Class Form1
Private comm As New CommManager()
Private transType As String = String.Empty
Dim inc As Integer
Dim con As New OleDb.OleDbConnection
Dim dbProvider As String
Dim dbSource As String
Dim laptimes As New DataSet
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
dbSource = "Data Source = f:/HareHound riderinput local.mdb;"
con.ConnectionString = dbProvider & dbSource
con.Open()
sql = "SELECT * FROM laptimes"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(laptimes, "HareHounds")
con.Close()
End Sub
Private Sub btnimportdata_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnimportdata.Click
CheckBox1.Checked = laptimes.Tables("HareHounds").Rows(0).Item(10)
End Sub
I have tried everthing to get this very simple thing to work, but I am at a loss. Help would be largly apreciated.