I am currently working with a vb2010 front end with access as the database. everything works for accessing the information adding information. But when I try to edit/update the contents of a row I find that the update is being applied to the first row of the table rather than the target row. i have tried using the ID as a way to specify the row i want updated but that doesn't appear to work.
UPDATE ExamContent
SET Question = ?, ExamsText = ?, [Answer 1] = ?, [Answer 2] = ?, [Answer 3] = ?, [Answer 4] = ?, CORRECT = ?, LastEditUser = ?, LastEditDate = ?
WHERE ID = ?
The corresponding code is then written like this,
Me.ExamContentTableAdapter.UpdateQuery(Question:=QuestionNumberBox.Text, ExamsText:=QuestionBox.Text, Answer_1:=Answer1.Text, Answer_2:=Answer2.Text, Answer_3:=Answer3.Text, Answer_4:=Answer4.Text, CORRECT:=Correct.Text, LastEditUser:=AAULoginForm.usertxt.Text, LastEditDate:=Date.Now.ToShortDateString, Original_ID:=IDTextBox.Text)
as i say the update is getting thru but is applied to the wrong row. what am i missing?