B
Benton
Hi there,
I am getting this exception
"Deleted row information cannot be accessed through the row"
when trying to update a datatable with an adapter:
mAdapter.Update(mTable); <== exception here
After struggling with this for hours, I am now looking for a more generic
answer, i.e., does anyone know the possible scenarios in which this
exception might occur inside the Update method. What "mistake" on my side
could be triggering it.
The exception usually happens if I:
1) Delete all rows in the table:
for (int i = 0; i < mTable.Rows.Count; i++)
mTable.Rows.Delete();
2) Add new rows to the table => mTable.Rows.Add(newRow);
3) Call the update method => adapter.Update();
Thanks in advance for any opinions,
-Benton
I am getting this exception
"Deleted row information cannot be accessed through the row"
when trying to update a datatable with an adapter:
mAdapter.Update(mTable); <== exception here
After struggling with this for hours, I am now looking for a more generic
answer, i.e., does anyone know the possible scenarios in which this
exception might occur inside the Update method. What "mistake" on my side
could be triggering it.
The exception usually happens if I:
1) Delete all rows in the table:
for (int i = 0; i < mTable.Rows.Count; i++)
mTable.Rows.Delete();
2) Add new rows to the table => mTable.Rows.Add(newRow);
3) Call the update method => adapter.Update();
Thanks in advance for any opinions,
-Benton