Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a trigger to disallow fields update
Message
From
16/03/2006 14:03:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
16/03/2006 13:59:20
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01105011
Message ID:
01105013
Views:
23
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform