SYTAX ERROR ON UPDATE STATEMENT, PLZ HELP, I CNT FIGURE IT OUT GUYZ

Private Sub SubmitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitButton.Click

    Try
        conn.Open()
        mystring = "UPDATE ClientLogIn SET Password = '" & PasswordTextBox.Text & "' WHERE  ClientID = '" & ClientIDTextBox.Text & "' AND Username = '" & UsernameTextBox.Text & "'"

        Dim cmd As OleDbCommand = New OleDbCommand(mystring, conn)
        cmd.ExecuteNonQuery()
        MsgBox("Password updated successfully")
        conn.Close()

    Catch ex As Exception
        MsgBox(ex.Message.ToString, , "Update Error")
    End Try
End Sub

"Password" is a reserved word in SQL. Try

mystring = "UPDATE ClientLogIn SET [Password] = '" & PasswordTextBox.Text & "' WHERE  ClientID = '" & ClientIDTextBox.Text & "' AND Username = '" & UsernameTextBox.Text & "'"

Thnx guys, i realy appreciate ur effort. my project is running nicely

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.