I'm hoping someone can help me identify what I have done wrong in my code. I've created an "Update" button that will update a database with info from a form. BUT, whenever I run the app it errors out.
Here's the 2 variations for the update I am playing with (the one currently being used is what is instructed by MSDN in the help section):
Me.DISLOG_TABLEBindingSource.EndEdit()
'If DisLogDataSet.DISLOG_TABLE.GetChanges() IsNot Nothing Then
' Me.DISLOG_TABLETableAdapter.Update(DisLogDataSet.DISLOG_TABLE.GetChanges())
' MsgBox("The record has been successfully updated")
' End If
Me.DISLOG_TABLETableAdapter.Update(Me.DisLogDataSet.DISLOG_TABLE)
The problem is it keeps erroring out on the last line or the GETCHANGES line.
Error msg reads "Update requires a valid UpdateCommand when passed DataRow collection with modified rows".
I don't know exactly what that means but it is obviously referring to the UpdateCommand - which I verified that I do have:
Public Overloads Overridable Function Update(ByVal dataTable As DisLogDataSet.DISLOG_TABLEDataTable) As Integer
Return Me.Adapter.Update(dataTable)
So, I'm at a loss. Can anybody please help. I need this app to be up-and-running by Monday.
Thanks in advance!