Data.Relation and reflexive relation

  • Thread starter Yvonne.Lebhardt
  • Start date
Y

Yvonne.Lebhardt

Hello,

I need to build a treeview in a winforms application. The datasource is
a dataset. I've the following tables

products(prodGUID, name)
categorys(catGUID, name, prodGUID, parentcatGUID)

So a tree might look like this:

rootnode
|
- product 1
- category 1
- category 2
- category 3
- category 4

To build a Tree with products and categorys is no problem. But how do I
handle the reflexive relation of the categorys (done with
parentcatGUID)??

If I set a reflexive Daterelation I get an error like "same table
cannot be a child-table in two cascaded realtions" (translated from
german).

Do you have any example for me

Thanks Yvonne
 
R

Ray Booysen

Hi Yvonne

On a side note, shouldn't the products table have a foreign key to
categorys not the categorys table having the prodGUID?

Regards
Ray
 
Y

Yvonne.Lebhardt

Hi Ray,

no, i don't talk about product-categories in the classic way.

The relation is product-category-question. Each product has serverall
categories with many questions in each category.

Yvonne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top