Getting cascade delete to work

  • Thread starter Thread starter TheNortonZ
  • Start date Start date
T

TheNortonZ

I have a parent table setup with a foreign key relationship to my child
table. In the relationship, I have selected to have cascaded deletes with
the child table.

In my dataset, I delete the parent row but do nothing to set the status of
the child rows.

I can see that my cascaded delete does not work. What is the correct way to
get this to work with datasets? Should the records to be deleted by marked
as deleted? Should I still have to perform an .Update for this table but
maybe without a real delete command?

Thanks.

Norton
 
Define "does not work". Do you get an error? Do you end up with orphaned
child records?

Jeff
 
Sorry, I meant does not work as in the child records were not being deleted.

However, it did start to work whenever I put the vb.net code back in that
deletes the rows. All I really had to do was not call any delete
functionality on the data adapter update command.

Thanks.

Norton
 
Back
Top