>>Go to VFP (or TaxRI) referential integrity, create the self-relation, and select "cascade" for the delete part. That's all! VFP (or TaxRI) will create all the required code.
>>
>>HTH, Hilmar.
>
>Seems easy! :) Gonna try that tomorrow!
>
>Thanks,
>
>Alonso.
Well, I regularly use it to delete children, when the parent is deleted, with business documents (invoices (facturas) against invoice details, and similar). This saves a lot of time.
The programs generated by Visual FoxPro RI should handle your recursive case, too, but I didn't try this (you may have trouble if there are too many levels - do some tests).
TaxRI generates more efficient (and 10 times smaller) code than VFP - see Download #
9923.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)