Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Illegal recursion in rule evaluation
Message
 
 
À
05/01/2005 04:59:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00973840
Message ID:
00974369
Vues:
55
>hi Nadya,
>
>Yes, the trigger could be written with the following in mind and not caring about the field rules
>
>(1) The updates could be in a transaction which rolls back if any error (code/1887, ...)
>(2) I would reopen the table and use seek and scan rest and update on a record by record basis, and roll back / exit if any single record update failed. This means that if it failed at eg record 6, that the first five updates would be undone by the rollback
>(3) any routine must return TRUE or FALSE up the tree
>(4) you need a specific error routine
>
>Anyway, writing a trigger takes (imo) a lot more than writing a few lines of code (take a look a the standard trigger code for starters). You need at least error and transaction management
>
>The trigger below does not do any of that.
>
>Personally I think one must first understand how the standard routines work.
>
>Then you can either replace all (insert/update/delete/error, ...) with your own, or write one or more specific using the standard that is already there
>
>Cheers,
>
>
>ps, to know what is happening behind the scenes, take a look at the standard routines (modi proc)

Gregory,

Thanks a lot, I'm going to study that. I hope you sent this message to Frank too, so he can re-think his code.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform