Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update order of views
Message
De
08/12/2000 13:55:37
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00450829
Message ID:
00450904
Vues:
36
>Kenneth,
>I see this as a Trigger problem and not a child view problem.
>
>From what you are describing, you are never (or rarely) going to update the language dependent information by itself. You are going to update the language independent version and that needs to be propagated to the language table.
>
>Add an Insert and Update trigger for the parent table. The trigger will know the Key field and also the situation (Insert/Update) and it can add or update records accordingly.
>
>HTH.
>
Yes it is a trigger problem but this is where I'm getting lost. I will never be updating the language dependent information (Childtable) alone only in conjunction with ParentTable but the inverse is true for the ParentTable . The question is when I add a new record to the view and then do a TableUpdate. The view will create a new record in both tables. ParentTable's key will get the new key value from the Default Value rule. I could then put an Insert trigger in the ParentTable to pass the new key value to the ChildTable, but what happens if the record in ParentTable is created first? The Child Record won't exist yet so it won't know where to put the key or will put it into a different record. I could also do the same with the ChildTable but the same would happen if the ChildTable record is added first.

I'm probably just spacing on this completely.

Thanks for taking time on this, ken
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform