(Resolved) TableAdapter Error
Im building an application that connects to a SQL Server. I have a datagrid on the form and when I make a change to the data and try to clikc the save command on the form, I get the following error:
InvalidOperationException was unhandled
code:
Public Class Form1
Private Sub MainDataBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainDataBindingNavigatorSaveItem.Click
Me.Validate()
Me.MainDataBindingSource.EndEdit()
Me.MainDataTableAdapter.Update(Me.HRPCTSDataSet.Ma inData)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'HRPCTSDataSet.MainData' table. You can move, or remove it, as needed.
Me.MainDataTableAdapter.Fill(Me.HRPCTSDataSet.Main Data)
End Sub
End Class
|