>Hi
>What should I do in delete trigger??
>If I have key MemberType in Parent tabel and child table, I purge the child table. After that I change the key value for the membertype in my parent table. Since some record in child table is purged, ifthese records restored, the relationship will be broken. How to solve it?
>
>Thank you
The delete trigger will fire before the record is actually deleted. You can grab the parent ID from the record, then update the parent.
IMO, it is not a good idea to keep information about the children in the parent for this very reason.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer