G
Guest
I receive the following error when trying to update a table after editing.
System.InvalidOperationException was unhandled
Message="Update requires a valid UpdateCommand when passed DataRow
collection with modified rows."
Source="System.Data"
Here is the code:
Private Sub SaveItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TestBindingNavigator.Click
Me.Validate()
Me.TestBindingSource.EndEdit()
Me.TestTableAdapter.Update(Me.DBDataSet.Test)
End Sub
Private Sub Form1tmp_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DBDataSet.iScanLogin' table.
You can move, or remove it, as needed.
Me.TestTableAdapter.Fill(Me.DBDataSet.Test)
End Sub
In other sections of the program I am able to save changes on other tables
in the same manner without any errors.
What am I doing wrong?
System.InvalidOperationException was unhandled
Message="Update requires a valid UpdateCommand when passed DataRow
collection with modified rows."
Source="System.Data"
Here is the code:
Private Sub SaveItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TestBindingNavigator.Click
Me.Validate()
Me.TestBindingSource.EndEdit()
Me.TestTableAdapter.Update(Me.DBDataSet.Test)
End Sub
Private Sub Form1tmp_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DBDataSet.iScanLogin' table.
You can move, or remove it, as needed.
Me.TestTableAdapter.Fill(Me.DBDataSet.Test)
End Sub
In other sections of the program I am able to save changes on other tables
in the same manner without any errors.
What am I doing wrong?