Hi,
I find the update code for TableAdapter is as follows:
Try
me.Validate()
me.activitybindingsource.EndEdit()
me.activityTableAdapter.Update(me.DataSet.activity)
MsgBox("Update successful")
Catch ex As Exception
MsgBox("Update failed")
End Try
I got a gridview which is bound to the "Dataset", in which is a SQL statement selecting data from a table in SQL Server. When user modify the values in the grid, and hit the button "Update", the modified values are saved to the database.
I place the above code to the button clicked event. However, I find that "activitybindingsource" and "DataSet" got error. May I know where to declare or include them? Where do they come from??
Thanks,
Eric