Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding redundant data in a view
Message
De
28/12/2003 17:52:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
28/12/2003 12:36:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00862327
Message ID:
00862382
Vues:
18
>So in other words, it should look more like a browse of parent and child after setting a relation and using set skip to... Thanks.

Well, perhaps it is better NOT to show data from two distinct tables as one single table. This might be more appropriate for a report.

For instance, download the sample program for the Visual Extend framework, and see how parent / child data is shown in separate forms. I don't like their "OneToMany" class, which shows parent on top, child at the bottom; but I created a version where the parent is shown in one page of a pageframe, and the child in another one. For instance, on Page1, the top half is used by a grid that shows several parent records, on the bottom are the fields for editing. Once the user switches to Page2, the same applies to the Child records; only children of the selected parent appear. Of course, the parent's key fields are not usually shown.

Although I tried this as an experiment in Bata/Bolivia, my users were more satisfied with the approach that did the same on separate forms (they preferred to see parent and child at the same time). This is a built-in part of the framework. Again, in the child grid, only the children that correspond to the selected parent (in the other form, in this case) are shown. And, of course, there is no need to repeat the FK for the parent, on the child form.

HTH,

Hilmar.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform