what i wanted to achieve is, i will choose what column should i update, this is why i am experimenting on my code but did not work and now i think i need some help.
Dim mysqlconn As New MySqlConnection
Dim conStr As String
conStr = "Server=localhost; user id=root; password=; database=dnc_floor"
mysqlconn = New MySqlConnection(conStr)
Dim update As String
Dim cmd As MySqlCommand
update = "Update floor set ='" & btnup & "'=btnval where ID='" & Day & "'"
cmd = New MySqlCommand(update, mysqlconn)
Dim check As String = cmd.ExecuteNonQuery()
Catch ex As MySqlException
MessageBox.Show("Check your connection with your database")
The update string is probably wrong. Maybe u think of that:
update = "Update floor set " & btnup & " ='" & btnval & "' where ID= '" & Day & "'"