Saving Data to the SQL table using a Dataset ?
Posted on 2006-04-20
I have added a datasource to my VB.NET 2005 project, its a SQL Table on my SQL Server.
I have a combo box drop down that shows the values from one of the fields in the table.
I have 3 text boxes bound to 3 other fields in the same table.
When you select a value from the combo box the text boxes update with the correct information. This is working great. I want to be able to add a button on the form that will save the information that is changed in one of the text boxes. When I change the information it remembers and saves it only while I have the form open, it is not saving those changes to the actual SQL table. I am trying to use the following code to save the changes on the table but I am stuck. What am I missing ?
I get the error "Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
Im not sure where to go with this. Any ideas ?
Thanks for all your help !