Parent -child datagridview with 3 tables

Fury

Active member
Joined
Oct 12, 2007
Messages
28
Programming Experience
Beginner
Hello, i'm working on my final project for school.
It is a warehous application. I want to show Suppliers in a datagridview and the corresponding products in another datagridview. When they click on a supplier the ProductDataGridView shows the correspondig products. I also want to show Suppliers without products. How can I do this. It is a multiple to multiple relation in the database. So I have 3 tables: Product, ProductSupplier and Supplier. I understand how to do it with 2 tables but not with 3. I hope someone can help me out.
 
Whatever I try, I allways get this error: 'column' argument cannot be null. Parameter name: column.
 
why is there any difference with 3 tables to two?

you dont have 3 elements in any relationship in a database.. you only ever have 2 elements: parent and child. Here you have two-of two elements where one element overlaps


i.e. you dont have grandparent-parent-child, you have

parent-CHILD, PARENT-child

and the ALL CAPS entities are the same table.

your grandmother is also a mother (she mothered your mum). youre a child, you have a mother, but your mother is also a child.. the child of your grandmother.. do you understand what I mean?
 

Latest posts

Back
Top