Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to programmatically add a table to a view?
Message
From
13/07/1998 02:17:30
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00116567
Message ID:
00116692
Views:
18
Thanks again for the input. I wanted to add the parent table (actually another view) to the child view in the database like you can in the view designer. You would think that the DBSETPROP(childview,'view',tables,...) would do it, but it does not.
//:^)
>Larry,
>
>No, their isn't a way to automatically add the parent table to the DE of a form if you drag a view out of the PM onto the form. You'll have to do it by hand.
>
>With the project hooks in VFP6 you might be able to do this.
>
>You don't put the parent table in the view FROM. Here's one of my coded views for example:
>
>
create sql view windowsview as;
>SELECT windows.iID, cWindowLetter,;
>  nQuantity, nWidth, nHeight,;
>  nCostPerSqFt, nPrice, lNameplate,;
>  lProtectiveCovering, lLightbox, lFrames,;
>  lFinalMeasurement, ;
>  CodesStyle.cValue as cWindowStyle, ;
>  CodesTop.cValue as cWindowTop ;
>  FROM  windows ;
>  INNER JOIN codes as CodesStyle;
>     ON  windows.iStyle = CodesStyle.iID;
>  INNER JOIN codes as CodesTop;
>     ON  windows.iTopShape = CodesTop.iID ;
> WHERE windows.iProject = ?Projects.iID ;
> order by cWindowLetter
>
>This view grabs all child windows for a project linking in two lookup fields from the codes table.
>
>>Now...Is there a way to "add" the parent table to the view so I don't have to remember to add it to the DE? I just tried adding the parent to the FROM clause and it is pulling in records from other than the selected parent record. I am testing it thru the command box, by selecting the target parent record, then issuing a REQUERY.
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform