Hi, as a continuation of this topic viewtopic.php?t=27242
i tried to implement a sample in which master detail relationship is done with MasteSource.
when i delete a master record anyway i do not see that the deletion of the details is done correctly.
i will send the sample to support.
i hope you can reply since i am stuck.
THanks.
HElp with deletion in master detail
Re: HElp with deletion in master detail
When creating the "FK_Detailtbl_Mastertbl" foreign key constraint, add the DELETE CASCADE option. Cascade deletion will help retain the link integrity of your database.
For example, here's a foreign key constraint creation script:
For example, here's a foreign key constraint creation script:
Code: Select all
ALTER TABLE [dbo].[Detailtbl] WITH CHECK ADD CONSTRAINT [FK_Detailtbl_Mastertbl] FOREIGN KEY([ID_MASTER])
REFERENCES [dbo].[Mastertbl] ([ID_MASTER]) ON DELETE CASCADE
Re: HElp with deletion in master detail
Thanks for the reply.
So you mean that there is no way to obtain deletiong thgouh "cached updates" withotu using the cascade delete option?
I thought that teh dataset could handle this.
Thanks.
So you mean that there is no way to obtain deletiong thgouh "cached updates" withotu using the cascade delete option?
I thought that teh dataset could handle this.
Thanks.
Re: HElp with deletion in master detail
The logic in your sample differs from the logic in the sample described in the viewtopic.php?t=27242 topic. When you delete records from the master dataset. you have to manually delete records from the detail dataset as well. SDAC doesn't automatically delete records from the detail dataset.