Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 23, 2012 01:51 PM by nsa08001
Apr 18, 2012 03:52 PM|LINK
I have a gridview for a table(A) that has a many-to-many relationship with one table(B), and a one-to-many relationship with another(C). If the B and C have items that need to be associated with an item in A, can I simply have the user edit the foreign key
fields in the Table A gridview to include the items (SQL Database Backend)? For example:
1st B Item PK: alpha
2nd B Item PK: beta
A Item FK for Table B: alpha, beta
^ two items from table B are now related to the item in A by adding both PKs to the FK field in the gridview of Table A.
Is there a way to make this work?
Apr 23, 2012 01:21 AM|LINK
Consider the SQL principle, before you modify table A the foreign key field, you should modify table B the primary key field.
So I think before you edit the foreign key fields in table A, you can do something to edit the B ,C in code behind.
Apr 23, 2012 01:51 PM|LINK
Thank you for replying, but that doesn't really help me.