can anyone please help me with my update statement, i am trying to update a row within a access 2007 database
here is my code.
Dim con As New OleDb.OleDbConnection
Dim cmd As New OleDb.OleDbCommand
Try
con.ConnectionString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" & Database & ";Persist Security Info=False"
con.Open()
cmd.Connection = con
cmd.CommandText = "update tblUsers SET Password = @Password where ID= @ID"
cmd.Parameters.AddWithValue("@Password", Me.txtpassword1.Text)
cmd.Parameters.AddWithValue("@ID", _userid)
cmd.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show("Error while inserting record on table..." & ex.Message, "Insert Records")
Finally
con.Close()
End Try
i receive the error Syntax Error on Update STATEMENT
please can someone help this has me stuck all day