Hi there,
I can already retrieve values from database (Microsoft Access). However, when i add new records, it won't be able to retrieve. Here's my codes:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
Dim con As New OleDb.OleDbConn ection
Dim ds As New DataSet
Dim da As New OleDb.OleDbData Adapter
Dim sql As String
con.ConnectionS tring = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=D:\BIE\S owmya.mdb;Jet OLEDB:Database Password=****"
con.Open()
sql = "SELECT * FROM thresholdTable"
da = New OleDb.OleDbData Adapter(sql, con)
da.Fill(ds, "Sowmya")
con.Close()
s = Me.nameComboBox .SelectedIndex
left250 = ds.Tables("Sowm ya").Rows(s).It em("AC250L")
right250 = ds.Tables("Sowm ya").Rows(s).It em("AC250R")
Me.Label1.Text = left250
End Sub
I can already retrieve values from database (Microsoft Access). However, when i add new records, it won't be able to retrieve. Here's my codes:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
Dim con As New OleDb.OleDbConn ection
Dim ds As New DataSet
Dim da As New OleDb.OleDbData Adapter
Dim sql As String
con.ConnectionS tring = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=D:\BIE\S owmya.mdb;Jet OLEDB:Database Password=****"
con.Open()
sql = "SELECT * FROM thresholdTable"
da = New OleDb.OleDbData Adapter(sql, con)
da.Fill(ds, "Sowmya")
con.Close()
s = Me.nameComboBox .SelectedIndex
left250 = ds.Tables("Sowm ya").Rows(s).It em("AC250L")
right250 = ds.Tables("Sowm ya").Rows(s).It em("AC250R")
Me.Label1.Text = left250
End Sub
Comment