Hi I have a problem with my SQL UPDATE
It says here:
Syntax error in UPDATE statement.
Here's my code:
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click
Dim sqlupdate As String
sqlupdate = "UPDATE usernames set password = '" & txtPass.Text & "', userlevel = '" & cboUserlvl.Text & "', user_lname = '" & txtLName.Text & "', user_fname = '" & txtFName.Text & "', gender = '" & cboGender.Text & "', position = '" & txtPosition.Text & "', contact = '" & txtContact.Text & "', address = '" & txtAdd.Text & "', email = '" & txtEmail.Text & "' where username = '" & txtUser.Text & "'"
executesql(sqlupdate)
MsgBox("Successfully update the user profile!", MsgBoxStyle.Information Or MsgBoxStyle.Exclamation, "Successful")
clear()
End Sub
I checked my db. btw I'm using MS Access 2007 and VB 2010, I think I got the names right but can't seem to find where's my error..
table name : usernames
Column names: username, password, userlevel, user_lname, user_fname, gender, position, contact, address, email
:( can anyone help me please?