frankdaniels
Member
- Joined
- Jan 27, 2006
- Messages
- 10
- Programming Experience
- Beginner
Any help would be appreciated. I am trying to understand datagridviews. I have tried everything and searched everywhere, but am so frustrated with the myriad of information to trawl through, I am getting suicidal. I have created a form with a datagrid view and a button. I have added the binding source, configured the dataset and the adapter has been created.
The form loads, and the data is loaded into the datagridview. Fine. all is well up to here. When configuring the adapter, a little message bow told me that the insert,delete,update etc etc were generated.
So please tell me in the simplest way possible, do you update the DATABASE with any changes made in the datagrid.
I cannot get this one simple thing to work. I have tried everything I can think of:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TeamweeklyTableAdapter.Update(Me.ReportsDataSet.teamweekly)
End Sub
When I click the button, this error message appears:
"Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
Why, why, why. If the update statements were automatically gereated, why is this happening. If anyone knows how to assist me, please, please,please do. I have tried many forums, and searched all over, been referred here there and everywhere, bought books and paid subscriptions. But am no nearer to understanding this F***** control.
Thanks.
The form loads, and the data is loaded into the datagridview. Fine. all is well up to here. When configuring the adapter, a little message bow told me that the insert,delete,update etc etc were generated.
So please tell me in the simplest way possible, do you update the DATABASE with any changes made in the datagrid.
I cannot get this one simple thing to work. I have tried everything I can think of:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TeamweeklyTableAdapter.Update(Me.ReportsDataSet.teamweekly)
End Sub
When I click the button, this error message appears:
"Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
Why, why, why. If the update statements were automatically gereated, why is this happening. If anyone knows how to assist me, please, please,please do. I have tried many forums, and searched all over, been referred here there and everywhere, bought books and paid subscriptions. But am no nearer to understanding this F***** control.
Thanks.