Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Relation Command
Message
De
16/06/2004 11:15:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
16/06/2004 11:06:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00914271
Message ID:
00914281
Vues:
21
>Need help on this one "Set Relation", ive successfully related two tables and bind it on the grid very well, but when i trigger the Sorting Option on my child table the parent child "Relation Breaks".
>
>&& Init Event
>Select tblchild
>Set Order idnumber
>Set Relation To idnumber Into tblchild In tblparent
>
>&& Command Button.Click Event()
>Select tblchild
>Set Order to datefiled Descending

The relation depends on a certain index being active in the child table. It is quite logical that the relation will stop working, if you select a different index.

Another alternative, one that allows you to sort the child table in a different order, is to use a view with a parameter (nickname: p-view). Every time you change the parent record, you have to assign the key value, that links the parent and the child, to the p-view, and update the view. The view will only show you the records that correspond to the parent record.

You can then sort the child view, creating a temporary index (INDEX TO).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform