hi...i am a new user of vb.net and i want to have a code where changes in my existing data could be save when i click the button "update"...can anyone help me about this matter?...here's my code for the said matter...
Private Sub menu_update_Click(sender As Object, e As EventArgs) Handles menu_update.Click
access = "UPDATE tbl_location WHERE locid = @locid SET locname = @locname, locadd = @locadd"
con.Open()
cmd = New OleDbCommand(access, con)
cmd.Parameters.AddWithValue("@txt_locname", txt_locname)
cmd.Parameters.AddWithValue("@txt_locadd", txt_locadd)
cmd.ExecuteNonQuery()
MsgBox("Successfully Updated...")
con.Close()
Me.menu_update.Enabled = False
Me.menu_save.Enabled = False
Me.txt_locname.Enabled = False
Me.txt_locadd.Enabled = False
End Sub
when i run the program, error appeared that there is an error in my update statement.