>I was looking into using triggers in an app. Does anyone use these in VFP apps?
>
>I was going to delete child record if the parent was deleted.... ie Invoice Header and Invoice Detail.
>
>But when I try to delete something and it fails I get this error message from foxpro.
>
>How do yall deal with this?
>
>It seems easier to just create the program and call it outside of the database. Then I could trap my errors and go from there.
>
>Can someone explane why I would a trigger?
>
>TIA,
Referential integrity is very easy to define (the mechanism it uses is triggers, but you generally don't have to worry about this).
I find triggers much more trustworthy. Specifically, you define the trigger functions ONCE in your database, and don't need later adjustments in case you make changes to the table from more than one form. Triggers also work when you edit data interactively.
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)