Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RI question
Message
From
24/11/2005 11:38:42
 
 
To
24/11/2005 10:03:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01071716
Message ID:
01071945
Views:
25
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).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform