That scares me on general principles. I think it would be much better to write application logic to check if there are lines left: after all, you could be deleting records and adding new ones, right?
But you could probably do that with a Delete Trigger on the child table if you really had to. On Fri, May 30, 2008 at 12:54 PM, John J. Mihaljevic < [EMAIL PROTECTED]> wrote: > Hi all, > > In a one-to-many relationship, I can easily see how to automatically delete > any child records when the corresponding parent record is deleted. But how > is this done in reverse? When the final child record of a relationship is > deleted, can the parent record automatically be deleted in some way? The > example I'm using is an order. When the final detail line of the order is > completed (and the record is deleted from the OrderDetail table), I'd like > the order header to automatically be deleted from the OrderHeader table. > --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

