Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rule or Default Value
Message
From
17/07/2003 09:48:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00810995
Message ID:
00811056
Views:
16
>Dear guys..
>
>I have some problem..
>It's about creating tables with the default value in some fields.
>for instances...
>
><mytables.dbf>
>field
>- A
>- B
>- C (Intend Value = A + B)
>- D (Intend Value = A * B)
Usually, if field "C" can be calculated from fields "A" and "B", I wouldn't save field "C" separately.

OTOH, a default value is only the initial value. Triggers would give you an error message, related to "recursion".

I am not sure whether validation rules (at the record or field level) can solve this, but I would just place the update commands on the form where the user accesses the table (TextBox.InteractiveChange()).
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