Reputation: 103
When a user clicks on the datagrid
, all information loads into a textbox
but when the user changes information and clicks Update
, it updates all rows instead of the single row.
This is what I'm using:
string Query = "UPDATE database.taxi SET PickupLocation='" +
txtPickupLocation.Text + "',PickupArea='" + comboBxPickupArea.Text +
"' WHERE ID = ID ;";
Upvotes: 0
Views: 68
Reputation: 26784
WHERE ID = ID
This condition is wrong,use WHERE ID =
somenumber.ID will always be ID
Upvotes: 1