I have written code in a VB.NET form to update the data in the database (The form was one that was auto generated via dragging and dropping).
I got this code from a previous question I had asked: http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_22711111.html
I have added the code:
to the event:
The problem now, is that it only works for the first update - Any subsequent updates generate the error:
"Column 'Code' does not allow nulls."
The Code column is the primary key, and indeed does not accept nulls. The problem is, that the Code is not a null - it has a value.
Can anyone suggest what I'm doing wrong here? What I can do to make it automatically update records consistantly?