Getting cascade delete to work

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
 
J

Jeff Dillon

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

Jeff
 
T

TheNortonZ

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top