S
s.bussing
Hi, as many before me, and probably after me, I recieved the following
error when I try to update my table using a typed dataset which
contains serveral tables.
The Delete/UpdateCommand affected 0 records
All my tables are related and all relationships are configured. For
simplicity I'm going to stick to two table. Parent and child. The
relationsship is defined with a cascading delete. So if I delete a row
in the parent, the child row is also marked as deleted. This is where
the problem starts. Booth tables have a dataadapter in which the
SQL-statements (MS SQL) are defined. When I the adapter of the child
table is executed (this is after the dataadapter of the parent
executed) I recieve the error as described in the subject. But when I
just delete the child directly, it is deleted without any errors.
I'm the only one working with (testing) the program, so there is no
possibility anyone else changed the record while I was working on it.
So, when I delete the row in the childtable directly, no problem. When
the row is deleted through a cascading delete (via the parenttable) I
recieve an error when the dataadapter of the childtable executes the
updatestatement.
What am I doing wrong?
During the configuration of the adapters I used Optimistic Concurrency.
Thx
error when I try to update my table using a typed dataset which
contains serveral tables.
The Delete/UpdateCommand affected 0 records
All my tables are related and all relationships are configured. For
simplicity I'm going to stick to two table. Parent and child. The
relationsship is defined with a cascading delete. So if I delete a row
in the parent, the child row is also marked as deleted. This is where
the problem starts. Booth tables have a dataadapter in which the
SQL-statements (MS SQL) are defined. When I the adapter of the child
table is executed (this is after the dataadapter of the parent
executed) I recieve the error as described in the subject. But when I
just delete the child directly, it is deleted without any errors.
I'm the only one working with (testing) the program, so there is no
possibility anyone else changed the record while I was working on it.
So, when I delete the row in the childtable directly, no problem. When
the row is deleted through a cascading delete (via the parenttable) I
recieve an error when the dataadapter of the childtable executes the
updatestatement.
What am I doing wrong?
During the configuration of the adapters I used Optimistic Concurrency.
Thx