The DeleteCommand affected 0 records

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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

.



Relevant Pages

  • Re: The DeleteCommand affected 0 records
    ... The Delete/UpdateCommand affected 0 records ... Parent and child. ... in the parent, the child row is also marked as deleted. ... recieve an error when the dataadapter of the childtable executes the ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: RMB Down event question
    ... I want to recieve the event of RMB Down on the area of the bigger dialog ... (even if the cursor was on one of the buttons or on the smaller child ... If every control is bound to an MFC object, ...
    (microsoft.public.vc.mfc)
  • RMB Down event question
    ... I want to recieve the event of RMB Down on the area of the bigger dialog ... (even if the cursor was on one of the buttons or on the smaller child ... avoid the headache of deriving the button of the dialog and deriving the ...
    (microsoft.public.vc.mfc)
  • Re: Child Benefit for Madaline
    ... But surely, as the name suggest, Child Benefit is indeed that. ... If the child is not there, then why recieve it? ... the person presumed dead turns up? ...
    (uk.legal)
  • Re: Child Benefit for Madaline
    ... But surely, as the name suggest, Child Benefit is indeed that. ... If the child is not there, then why recieve it? ... missing person is presumed dead legally after seven years. ...
    (uk.legal)