Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Many-To-Many Relationship
Message
De
14/03/2007 10:30:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Titre:
Many-To-Many Relationship
Divers
Thread ID:
01203367
Message ID:
01203367
Vues:
61
Visual Foxpro 9 SP1
Codemine v7.5.1a

I am having a problem getting my head around how to handle a many-to-many relationship in Codemine. Well, actually, I haven't done too many of these outside of codemine either so I don't really know if it is my inexperience or not knowing how codemine handles them.

Here is my current setup table wise. I have to handle multiple categories of products while allowing multiple products per category.

Categories
categoryid - primary key

ProdCats (join/link table)
categoryid - regular index
productid - regular index

Products
productid - primary key

At this point, I need to browse through the categories and get a list of all the products per category.

I have set up a custom CDE to handle the tables and hopefully the relations.

On the relations tab of prodcats, I have set the parent cursor alias to Categories, the parent key field to categoryid, the foreign key field to categoryid and checked the re-select child recordset when parent moves.

On the relations tab of products, I have set the parent cursor alias to Prodcats, the parent key field to productid, the foreign key field to productid and checked the re-select child recordset when parent moves.

My thought was that I could use a ctlcombonavigator for the categories and a lstlistnavigator for the products. After setting up a test form, all of the categories show up, but only one product ever shows up in the listbox even though there are several in the table.

I thought I was on the right track, but now I don't even know if I am close to finding a solution.

Could someone please give me a few pointers on how to get this setup to function properly? I would appreciate any help offered.

Regards,

Shane Hamilton
Répondre
Fil
Voir

Click here to load this message in the networking platform