Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rule or Default Value
Message
De
17/07/2003 09:48:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00810995
Message ID:
00811056
Vues:
17
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform