Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change a record between DBC's
Message
De
05/11/2001 14:02:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00577332
Message ID:
00577514
Vues:
23
>>>>I want to change the value of a field in a particular record in one DBC based on the result or event in another DBC.
>>>
>>>I would probably use an UPDATE TRIGGER that is a function call to a SP in the DBC. In that procedure, I would then update the other table in the other DBC. Keep in mind the UPDATE TRIGGER fires if any field is updated in the record, so I would do some checking with the GetFldState function[row or table buffering required].
>>
>>In my experience, if buffering is used, the trigger doesn't fire with every field change, but only when you do TableUpdate() (or when you have record-buffering, and leave the record).
>>
>>The rule that the trigger fires for every field updated does apply when no buffering is used.
>>
>>Hilmar.
>
>Yes I know. I would only want this kind of updating upon record validation and not filed validation which is why I suggested an Update trigger instead of a field validation rule. Also, IMHO, no one should be working with the tables directly. They should be using views or cursors.

Oh, I see. I obviously misunderstood "if any field is updated", as "as soon as any field is updated". Which isn't what you meant.

Personally, I never work with field validation or record validation rules - I found that these cause too much trouble. Triggers are much more well-behaved, IMO.

Hilmar.
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