It sounds to me that you want to have associative or "junction" tables.
CONTACT CONTACT_PRODUCT PRODUCT
========= ============= =======
CONTACT_ID CONTACT_ID PRODUCT_ID
PRODUCT_ID
The Contact_product table will have multiple entries for the same contact,
each one "pointing" to a product ID for that contact_ID in the PRODUCT table.
-- Peter
Site:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
MetaFinder:
http://www.blogmetafinder.com
"J" wrote:
> I'm a bit new to asp.net and I'm investigating the best approach to this:
>
> I have a contact table that includes stuff like Name, address, phone, etc.
> Because each contact can contain multiple 'product' values, I have a
> separate product table that has a many-to-one relationship with the contact
> table. I also have an 'industry' table that also has a many-to-one
> relationship with the contact table.
>
> 1. I would like to have a page that has a search box, and displays results
> with summary info.
>
> 2. By clicking one of the records in the summary results, another page that
> contains the contact edit screen comes up. This will include an 'product'
> section and an 'industry' section which has check boxes to select all the
> products or industries for this particular contact (looking up the values in
> lookup tables).
>
> Ideally, I could leverage asp.net controls as much as possible but sometimes
> I seem to beat myself up trying go get them to do what I want them to do. I
> can very quickly and easily do step number 1 by using a databound GridView
> control. Yet it's not intuitive to my how to make the last name a link to
> an edit page. Accomplishing number 2 seems to fall apart with the
> many-to-one relationship data.
>
> Any ideas on how to approach this would be appreciated.
>
>
>