Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to programmatically add a table to a view?
Message
From
12/07/1998 14:25:13
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00116567
Message ID:
00116625
Views:
15
David & Kamal,
GREAT!! Thanks for the info //:^)

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.

>Larry,
>
>Make your WHERE: childtable.paretnkey=?parenttable.keyfield. The ? makes it a parameterized view. This way you don't need to keep recreating the view. When you drop the view into the DE, set it to NoDataOnLoad. Then in the Init() of the form Requery() the view and Refresh() the form.
>
>>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
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform