DataAdapter.UPDATE ERROR?

Im trying to update my DataAdapter via Datagrid and its erroring out?

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
[1886 byte] By [nolc] at [2007-11-17 16:53:13]
# 1 Re: DataAdapter.UPDATE ERROR?
That looks like the error you get if you never configured an Update statment for the DataAdapter.
If you used the IDE to confgure your DataAdapter, it should warn you if it cannot create an Update and/or Delete command.
This is very common when the DataAdapter is based on a view rather than a table.
If this is the case, then the only suggestion I can offer is to manually create an Update command for your data adapter.
To get the correct syntax, just create a dummy form and add a table (not a view) to the form, and configure the DataAdapter.
Look at the code generated for the Update command, and adapt it to your case.

Hope this helps.
ekatz at 2007-11-10 3:26:24 >