Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a trigger to disallow fields update
Message
De
16/03/2006 14:03:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
16/03/2006 13:59:20
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 6
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01105011
Message ID:
01105013
Vues:
21
>Hi,
>I want to know since I can create a trigger in a table of vfp6 to not update a field

Did I understood correctly, you want to avoid a field to be changed?

Your trigger function might look something like this:
if SomeOtherCondition and CriticalField # oldval("CriticalField")
  return .F.
endif
The part that says SomeOtherCondition and is optional, of course. You may want to avoid updates after a certain date, or avoid a document to be changed after some official approval.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform