Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apple, tomato, lettuce -- hierarchical recordsets???
Message
De
15/05/2001 21:08:59
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Apple, tomato, lettuce -- hierarchical recordsets???
Divers
Thread ID:
00507652
Message ID:
00507652
Vues:
48
good day! i'm having trouble with parent-child relationship. one typical exampleis the ITEM_CATEGORY & ITEM:

ITEM_CATEGORY
- item_cat_code (primary key)
- item_cat_desc

ITEM
- item_cat_code (foreign key)
- item_code (primary key)
- item_desc

i'm using ADO recordsets (rsItem_Category & rsItem), how do i make my rsItem automatically contain the related records everytime my rsItem_Category moves to another row.
to illustrate here's a sample data:
rsItem_Category
item_cat_code item_cat_desc
FRTS FRUITS
VEGE VEGETABLES

rsItem
item_cat_code item_code item_desc
FRTS APPL APPLE
VEGE TOM TOMATO
VEGE LET LETTUCE

as i was saying, when rsItem_Category is in the second record (item_cat_code = 'VEGE'), rsItem should have these records (item_code = 'TOM', item_code = 'LET').

when i was programming in visual foxpro, i use the data environment and add the two tables, then i relate the two tables by dragging the ITEM_CATEGORY.item_cat_code to ITEM.item_cat_code.

how do i do this in visual basic?
i know how to use hierarchical recordsets (data shaping), but the problem is that i can't edit/addnew/update the records.
am i missing something on hierarchical recordsets? or is there any other way to do this?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform