T
Tim Kelley
I need to loop through a datatable and update a particular field. This
seems like it should be fairly easy but it is giving me fits. Here is the
code that I have so far.
foreach (DataRow row in dataTable.Rows)
{
row["fldName"] = "xyz";
dataAdapter.Update(dataTable);
}
When I run this, I get the following error: Update requires a valid
UpdateCommand when passed DataRow collection with modified rows.
Is there another parameter needed to the update?
seems like it should be fairly easy but it is giving me fits. Here is the
code that I have so far.
foreach (DataRow row in dataTable.Rows)
{
row["fldName"] = "xyz";
dataAdapter.Update(dataTable);
}
When I run this, I get the following error: Update requires a valid
UpdateCommand when passed DataRow collection with modified rows.
Is there another parameter needed to the update?