Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy value from 1 field to another in the dbc
Message
From
30/07/1998 11:24:18
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00122106
Message ID:
00122705
Views:
20
I implemented the mirroring by creating a record-level validation rule that calls a stored procedure that basically does:

DO CASE
CASE OLDVAL(desc) != desc && if desc has changed, propogate the change
REPLACE cDesc WITH desc
CASE OLDVAL(cDesc) != cDesc && if cdesc has changed, propogate the change
REPLACE cDesc WITH desc
CASE desc != cDesc && if they're different, assume that desc is correct
REPLACE cDesc WITH desc
ENDIF

This works fine in all the testing I've done. But, I've got a VFP 3.0 book that says "validation code cannot change any field in the current record". Maybe the book is wrong. I couldn't find any VFP 5.0 doc saying it was OK or not OK to do this.

Bob

P.S. Thanks for all the help, even if you post at odd hours <g>
Previous
Reply
Map
View

Click here to load this message in the networking platform