Hi,
I need some help in my database. Right now, i've already managed to connect my program with the database. But i don't know how to continue from there. I have a toneLabel where the values change accordingly when a button is pressed. When i select a name from a combo box, and click presentButton, it should get values (under that name) from the database. If the toneLabel value corresponds to the value from the database (for that particular name), a smiley face will appear.
If toneLabel.text >= (value from database, eg. AC250L, AC250R)
Me.PictureBox1. Visible = True
tmrTimer.Interv al = 1000
tmrTimer.Enable d = True
Just that i don't know how to retrieve the values and compare it with the toneLabel value (without having to display it on my GUI).
Here are some of my codes..
Private Sub BIEMaskingMachi ne_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'TODO: This line of code loads data into the 'Actual_Databas eDataSet.Thresh old_Database' table. You can move, or remove it, as needed.
Me.Threshold_Da tabaseTableAdap ter.Fill(Me.Act ual_DatabaseDat aSet.Threshold_ Database)
Dim con As New OleDb.OleDbConn ection
con.ConnectionS tring = "Provider = Microsoft.Jet.O LEDB.4.0;Data Source = D:\project1\BIE Project\Actual Database.mdb;Je t OLEDB:Database Password=xxxx"
con.Open()
MsgBox("A Connection is now open")
'Use a variable to hold the SQL statement.
Dim selectString As String = "SELECT Name, AC250L, AC250L, BC250L, BC250R, AC500L, AC500R, BC500L, BC500R, AC750L, AC750R, BC750L, BC750R, AC1KzL, AC1KzR, BC1KzL, BC1KzR, AC15KL, AC15KR, BC15KL, BC15KR, AC2KzL, AC2KzR, BC2KzL, BC2KzR, AC3KzL, AC3KzR, BC3KzL, BC3KzR, AC4KzL, AC4KzR, BC4KzL, BC4KzR, AC6KzL, AC6KzR, BC6KzL, BC6KzR, AC8KzL, AC8KzR, BC8KzL, BC8KzR "
'Create an OleDbCommand object.
Dim cmd As OleDb.OleDbComm and = New OleDb.OleDbComm and(selectStrin g, con)
con.Close()
MsgBox("A Connection is now closed")
End Sub
I need some help in my database. Right now, i've already managed to connect my program with the database. But i don't know how to continue from there. I have a toneLabel where the values change accordingly when a button is pressed. When i select a name from a combo box, and click presentButton, it should get values (under that name) from the database. If the toneLabel value corresponds to the value from the database (for that particular name), a smiley face will appear.
If toneLabel.text >= (value from database, eg. AC250L, AC250R)
Me.PictureBox1. Visible = True
tmrTimer.Interv al = 1000
tmrTimer.Enable d = True
Just that i don't know how to retrieve the values and compare it with the toneLabel value (without having to display it on my GUI).
Here are some of my codes..
Private Sub BIEMaskingMachi ne_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'TODO: This line of code loads data into the 'Actual_Databas eDataSet.Thresh old_Database' table. You can move, or remove it, as needed.
Me.Threshold_Da tabaseTableAdap ter.Fill(Me.Act ual_DatabaseDat aSet.Threshold_ Database)
Dim con As New OleDb.OleDbConn ection
con.ConnectionS tring = "Provider = Microsoft.Jet.O LEDB.4.0;Data Source = D:\project1\BIE Project\Actual Database.mdb;Je t OLEDB:Database Password=xxxx"
con.Open()
MsgBox("A Connection is now open")
'Use a variable to hold the SQL statement.
Dim selectString As String = "SELECT Name, AC250L, AC250L, BC250L, BC250R, AC500L, AC500R, BC500L, BC500R, AC750L, AC750R, BC750L, BC750R, AC1KzL, AC1KzR, BC1KzL, BC1KzR, AC15KL, AC15KR, BC15KL, BC15KR, AC2KzL, AC2KzR, BC2KzL, BC2KzR, AC3KzL, AC3KzR, BC3KzL, BC3KzR, AC4KzL, AC4KzR, BC4KzL, BC4KzR, AC6KzL, AC6KzR, BC6KzL, BC6KzR, AC8KzL, AC8KzR, BC8KzL, BC8KzR "
'Create an OleDbCommand object.
Dim cmd As OleDb.OleDbComm and = New OleDb.OleDbComm and(selectStrin g, con)
con.Close()
MsgBox("A Connection is now closed")
End Sub