Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating view from left outer join tables
Message
From
19/02/1999 05:40:27
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00188347
Message ID:
00189192
Views:
48
>In the original Codebook, in the save of the invoice (just an example)
>IF CURSORGETPROP("SOURCETYPE") <> DB_SRCTABLE
> *-- Update the view's nInvoiceTotal field. This is field
> *-- is a calculated field in the view, so no updates will
> *-- be done to the back end.
> REPLACE ninvoicetotal with this.oChildBizObj.GetTotal()
>ENDIF
>
>So what I do now is something similar in the hook that comes just after the save. So when going to the list, the changes are reflected in the grid without the need to requery anything.
>
>José

Si muchas gracias José.

I already thought of this, but it seemed violating to me, what it in fact is.
But on the other hand I lost track of KISS.
It's not totally correct but the second best solution.
I had it documented in my code why the replace is done and I think that excuses a bit the 'incorrect' way of working.
Like you pointed out in your comment, the view fields have nothing to do with the backend fields but are only used for display purposes. So in fact it is more correct than I thought on first hand.

Hasta luego.
Previous
Reply
Map
View

Click here to load this message in the networking platform