Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to programmatically add a table to a view?
Message
 
To
12/07/1998 01:11:46
Larry Long
ProgRes (Programming Resources)
Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00116567
Message ID:
00116569
Views:
12
Hi Larry,

You can create a parameterized view such as
SELECT * FROM YourTable WHERE YourTable.cParentId = ?vp_cParentId
This way, you can define the value of variable vp_cParentId and issue a REQUERY().

>I am displaying/editing parent and child records from within a formset. I am using a parent view and a child view. I can create the views thru the view designer for testing, but I need to be able to programmatically create and save the views in a database, that allows me to display the child records when navigating thru my parent records, without using the view designer.
>
>No problem creating the parent view.
>
>How do I add the parent view to the child view without setting up a relationship, so I can run the query...
>
>SELE * FROM childtable WHERE childtable.parentkey=parenttable.keyfield
>
>I have tried using DBSETPROP with the TABLES property, and although the changes are save, I have to open the parent table before I can open the child view.
>
>In the view designer I would simply add the parent view to the data environment, then create the view.
>
>PHIS!
>(Please Help...I'm Stumpped!)
Previous
Reply
Map
View

Click here to load this message in the networking platform