Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extra rows in grid because of 1 to many relationship
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00055512
Message ID:
00055827
Views:
30
>>Mark gave you the code for a regular view. A parameterized view simply adds one more clause in the WHERE section which can be updated programmatically
>>
>>   Create SQL View as Select field list from table1, table2 where ;
>>      table1.keyfield = table2.keyfield;
>> >>>     AND table2.SortField = ?MyVar;    <<<<
>>      and .... order by ... ;
>>        into cursor CursorName
>>>
>>
>>Then be sure you have MyVar programmatically assigned the child value you want to see. You can re-assign MyVar and requery the view whenever Child1/Child2 change.
>
>
>Thanks I guess I'll try this. Maybe you could answer a question
>for me then. In all seriousness. Isn't it easieer to use the
>original way of having a 1 to many relationship set? Assuming
>it worked of course. Why should one have to do all of this in
>order for a simple relationship to work. Would you consider this
>a bug in VFP?
>
>thanks again
>Gary

It's not really a bug. If you setup a browse of 2 tables with set skip on, you get the same results. The grid is just a fancy way of browsing the tables.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform