DataAdapter.UPDATE ERROR?
ERROR:
Additional Information: Update requires a valid UpdateCommand when passed DataRow Collection with modified rows.
CODE:
Public Class Whatever
Private CurrentDA As SqlDataAdapter
Private CurrentDS As DataSet
Private CurrentTable As String
Private Sub llPartyID_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles llPartyID.DoubleClick
Dim myDataSet As New DataSet()
myDataSet = LOADcboPartyID()
CurrentDS = myDataSet
CurrentTable = "PartyIDType"
dgComboBox.DataSource = myDataSet.Tables(CurrentTable)
End Sub
Private Function LOADcboPartyID() As DataSet
Dim cnString As String = "server= wnts01;Trusted_Connection=False;database=NODsql;UID=sa; pwd="
Dim myConnection As SqlConnection = New SqlConnection(cnString)
Dim myCommand As SqlCommand = New SqlCommand("spSELECTPartyIDType", myConnection)
' Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure
'Dim myDataAdapter As SqlDataAdapter()
Dim myDataAdapter As SqlDataAdapter = New SqlDataAdapter(myCommand)
' Create and Fill the DataSet
Dim myDataSet As New DataSet()
'myDataAdapter.FillSchema(myDataSet, SchemaType.Source, "LOADcboPartyID")
myDataAdapter.Fill(myDataSet, "PartyIDType")
CurrentDA = myDataAdapter
Return myDataSet
End Function
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
CurrentDA.Update(CurrentDS, CurrentTable) ERROR OCCURS HERE?
End Sub

