G
Guest
The following code:
Try
da.Update(ds.Tables(dg1Name))
Catch ex As Exception
Console.WriteLine(ex.ToString)
MessageBox.Show(ex.ToString)
End Try
causes this error:
System.InvalidOperationException: Update requires a valid UpdateCommand when
passed DataRow collection with modified rows.
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at comments.Form1.Button1_Click(Object sender, EventArgs e) in
G:\Shared\VBShare\dotnet\Kevin\comments\Form1.vb:line 161
The code is behiend a button on the form called Update. If I change the data
in the grid I get the error when I press the update button. Any advice will
be much appreciated.
Kevin
Try
da.Update(ds.Tables(dg1Name))
Catch ex As Exception
Console.WriteLine(ex.ToString)
MessageBox.Show(ex.ToString)
End Try
causes this error:
System.InvalidOperationException: Update requires a valid UpdateCommand when
passed DataRow collection with modified rows.
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at comments.Form1.Button1_Click(Object sender, EventArgs e) in
G:\Shared\VBShare\dotnet\Kevin\comments\Form1.vb:line 161
The code is behiend a button on the form called Update. If I change the data
in the grid I get the error when I press the update button. Any advice will
be much appreciated.
Kevin