I have a SQL database with a simple table (InstTypes), the fields and contents are as shown below:
No Description
1 aa
2 bb
3 cc

I can edit the datagrid and on the save button I have the following code

Private Sub btnOK_Click(sender As System.Object, e As System.EventArgs) Handles btnOK.Click
Me.Validate()
Me.InstTypesBindingSource.EndEdit()
Me.InstTypesTableAdapter.Update(Me.MIS3_new1DataSet.InstTypes)
Me.Close()
End Sub


"No" is auto-incrementing and is read only.

If I change "bb" to "dd" and try to save I get the following error.

Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.

The update command is shown below.
UPDATE [dbo].[InstTypes] SET [No]=@No, [Description]=@Description WHERE (([No]=@No) AND ([Description]=@Description))

What am I doing wrong?
Thanks