Hi All,
I am using VB 2008.
I want to update my table in SQL 2008.
I am displaying the data in a data grid view
I am changing some data in the datagrid view.
And want to update the same in my table. How to do so....???
I am using the below code to uodate the data in the table on a button click.
Below is the code.
VB.NET:
Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click
TableCollectionTableAdapter.Update(Collection)
End Sub
I am getting an error on the below line:
VB.NET:
TableCollectionTableAdapter.Update(Collection)
Below is the error which I am getting:
HTML:
System.InvalidOperationException was unhandled
Message="Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
Source="System.Data"
Please guide on how to update the same in my table. How to do so....???


Regards
Sudhir