开发者

Link one row to multiple rows in another table SQL CE

开发者 https://www.devze.com 2023-04-13 03:46 出处:网络
okay I\'ll be as clear as I possible can, we have a supplier list that is quite frankly endless, therefore I decided to do a small app with combo boxes (C#). The app is set up such that the first com

okay I'll be as clear as I possible can,

we have a supplier list that is quite frankly endless, therefore I decided to do a small app with combo boxes (C#). The app is set up such that the first combo box contains all the manufacturers (eg Intel, Gigabyte, Asus etc.), the second combo box will list the different suppliers that supply that product, and the third combo box will list the sales reps for the supplier.

So for eg: I want to find a supplier for Intel products: Combo Box 1: Intel. Combo Box 2: Axiz, Rectron, Ingram Micro (I chose Axiz). Combo Box 3: Pete or Sarah or Michelle (I chose Sarah). Label that shows contact number开发者_StackOverflow社区s from Sarah.

QUESTION: I'm limited to sql ce, my problem is how do I link one row in a table to multiple rows in another? So when I select a product in Combo Box 1 it must query the sql ce and display all suppliers in a supplier table that matches it.


Your two entities suplier and manufacturer has a many-to-many relation ship. So you have to create a new table to hold those relationships. Check the url for more info.

0

精彩评论

暂无评论...
验证码 换一张
取 消