Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record validation rule problem
Message
De
12/01/2008 22:28:24
 
 
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 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01281395
Message ID:
01281397
Vues:
7
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform