Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RI question
Message
De
24/11/2005 11:38:42
 
 
À
24/11/2005 10:03:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01071716
Message ID:
01071945
Vues:
24
Good tip, that. I've got the logging working nicely, just one more problem to overcome.

In this particular case, I need to conditionally allow the cascade delete on the child records, depending on field data. If any fail, disallow the parent delete BUT keep the child deletions intact. Today, my mind is more on food that code. Tomorrow is another day....

>Yes, it is only a question of chaining with AND.
>
>By the way, you can use shortcut boolean evaluation to your advantage.
>
>In an expression like:
>
>
>_ri_Table1_delete() AND udf_copy_to_history()
>
>
>(Assuming that the first function is the built-in RI function, and the second your UDF)
>
>Your UDF will only be invoked if the RI function was successful. This is because, if it returns .F., the AND will always be .F., no matter what the second part of the expression returns. In this case, then, VFP doesn't even evaluate the second part.
>
>In other words, there is nothing for you to worry about, as long as you put the functions in the correct order (only copy to history data AFTER the delete was successful).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform