I am getting an error when trying to update a database via a tableadapter .update method.
Here is the code:
The error is update requires valid updatecommand when passed datarow clooection with modified rows.
I have built the dataset MyFinanceDataset again and it says that all the commands were created, select insert etc.
So I dont understand why this should happen as I am using a Typed dataset?
Here is the code:
VB.NET:
Dim ds As New MyFinanceDataSet
Dim ta As New MyFinanceDataSetTableAdapters.MFTableAdapter
Dim ro As MyFinanceDataSet.MFRow = Nothing
ta.Fill(ds.MF)
If ds.MF.Rows.Count = 0 Then
ro = ds.MF.NewMFRow
ds.MF.Rows.Add(ro)
ta.Update(ds.MF)
End If
ds.MF(0).fld = System.Text.Encoding.Default.GetString(tmpHashNew)
' error happens here
ta.Update(ds.MF)
The error is update requires valid updatecommand when passed datarow clooection with modified rows.
I have built the dataset MyFinanceDataset again and it says that all the commands were created, select insert etc.
So I dont understand why this should happen as I am using a Typed dataset?