Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record validation rule problem
Message
From
12/01/2008 22:28:24
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01281395
Message ID:
01281397
Views:
6
>>Hi all:
>>
>>I have a record validation rule that fires a stored procedure that updates a 'lastupdated' field.
>>
>>However, I want this to execute only when the user makes a change.
>>
>>I've found that whenever I do a MODIFY STRUCTURE, the procedure fires for every record in the table!
>>
>>How can I stop this?
>>
>>Thanks,
>>
>>Yossi
>
>If you're using ALTER TABLE command, look at NOVALIDATE clause. Otherwise include some flag into your validation procedure to not fire and set this flag to true before running MODIFY STRUCTURE command.
>
>See, for example, Re: Is it possible to prevent field validation from running? Thread #841695 Message #841965
>
>You can also remove the rule temporarily, make your change and put the rule back.

Naomi:

I'm aware that I can use a flag or remove the rule temporarily, BUT that means that I have to remember to execute something before doing a MODI STRU, and I could concievable forget. It would be better if there was somehow a way that the procedure could know that it is in the middle of a MODI STRU operation.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform