Hi guys, I have got a button to update and save data changes.
When I did not make any changes, I will have a successful update.
When I made changes, it will be give me this errorWithout Try statements)
Update requires a valid UpdateCommand when passed DataRow collection with modified rows.
The below is my codings. Anyone have suggestions? Thanks.:eek:
If Me.Validate Then
Try
Me.CanDrinksBindingSource.EndEdit()
Me.CanDrinksTableAdapter.Update(Me.StockDataSet.CanDrinks) 'Update method
MessageBox.Show("Update Successful!")
Catch ex As Exception
MessageBox.Show("Update failed")
End Try
End If
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.