|
>make sure not to delete a header record >when there are still detail records You mentioned cascading updates later, but I find cascading deleted to be great. Obviously you have to be careful about their use, it wouldn't make sense to say "delete all the order lines for item 12345 when I delete item 12345" But when the children row(s) are truly children I love cascading delete. Take Order Header, Detail, ShipTo. I can allow cascading delete from order header to detail and shipto and all I have to code in my RPG is the delete of the header, the OS kills the children. The other great advantage of cascading delete is one of later enhancement. Take the above example again. Say that's in production and running nicely. Now I want to add a notes function to store user comments about an order. I can change the relationships to cascade the delete to the notes table and I don't have to change the program that deletes an order. That's one less program to check-out, change, test, check-in, test, and promote. -Walden ------------ Walden H Leverich III President & CEO Tech Software (516) 627-3800 x11 WaldenL@xxxxxxxxxxxxxxx http://www.TechSoftInc.com Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.