Update requires a valid UpdateCommand ?

janilane

Active member
Joined
Jan 23, 2008
Messages
30
Programming Experience
Beginner
:)


Here is my fill method with dataset having an error of:

Update requires a valid UpdateCommand when passed DataRow collection with modified rows.

myAdapter.Fill(mydataset, "Maximus")
con.Close()

'Dim dt As DataTable = mydataset.Tables.Item("Maximus") OR another form
Dim dt As DataTable = mydataset.Tables("Maximus")
Dim myRecords As DataRow

For Each myRecords In dt.Rows
'write second column
'MessageBox.Show(myRecords.Item(2))
Next

Dim myRecord As DataRow = dt.Select("DisabilityDesc = 'Deaf'")(0)
myRecord("DisabilityDesc") = "Bingi"
myAdapter.Update(mydataset.GetChanges, "Maximus")
mydataset.AcceptChanges()


Any ideas? Thanks
 
Back
Top