Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extra rows in grid because of 1 to many relationship
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00055512
Message ID:
00055827
Vues:
36
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform