Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last Updated User
Message
De
19/02/2005 04:19:45
 
 
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 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00988451
Message ID:
00988561
Vues:
22
Nadya,

I think you can do so in the RecordValidation rule of the base tables

You can use getfldstate(-1)

For inserts, just replace tLast_Updated_Date and cLast_Updated_User

For updates, loop using getfldstate(-1) and if getfldstate(-1) indicates a change for a field, compare the fieldvalue to the oldval() in case a field is changed and reset to its old value

The only drawback is that the RecordValidation rule does not fire for a delete as far as I can see. Don't know whether that is a problem for you


>Hi everybody,
>
>In our tables we have tLast_Updated_Date and cLast_Updated_User fields. How can we update these fields if we change our tables? Is it possible to do in a view? What if the view consists of several tables and two of them needs to be updated?
>
>How do you solve this problem?
>
>Thanks in advance.
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform