F
Flomo Togba Kwele
I got the following error:
Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.
I have two tables in a strongly typed dataset, parent and child. I have defined
the delete rule of the relationship to cascade in both the dataset and in the
database.
I can delete a parent, and its associated children via sql:
DELETE FROM Parent where ParentID=6
I have defined the following updates in code:
_parentTableAdapter.Update(aDataSet.ParentTable)
_childTableAdapter.Update(aDataSet.ChildTable)
The error occurs in the second update. However, the parent and children rows
have been successfully deleted from the dataset and the database.
I don't understand the error message, nor how to avoid it. Can anyone point me
in the correct direction?
Thanks, Flomo
--
Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.
I have two tables in a strongly typed dataset, parent and child. I have defined
the delete rule of the relationship to cascade in both the dataset and in the
database.
I can delete a parent, and its associated children via sql:
DELETE FROM Parent where ParentID=6
I have defined the following updates in code:
_parentTableAdapter.Update(aDataSet.ParentTable)
_childTableAdapter.Update(aDataSet.ChildTable)
The error occurs in the second update. However, the parent and children rows
have been successfully deleted from the dataset and the database.
I don't understand the error message, nor how to avoid it. Can anyone point me
in the correct direction?
Thanks, Flomo
--