Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update order of views
Message
From
08/12/2000 13:55:37
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00450829
Message ID:
00450904
Views:
35
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform