Database Foreign key map Primary key tabale other column

muhammadanzar

Member
Joined
Dec 25, 2005
Messages
18
Programming Experience
Beginner
Respect Sir,

I have two Tables A and B. I user Sql Server and Vb.net. Table A have a column A_ID, A_Name Here A_ID is consider as a Primary key. where as Table B have B_ID,Course,A_ID Columns here A_ID consider as a Foreign key.
In Forms B can Display the A_ID which is a number, But I want that In forms Table B Foreign key column map the Table A with acolumn name to A_Name which is found in Primary key Table at the time of Display. But at the time of insertion insert a number or name as well.
Note :
i am using Data set A for Table A
and Data Set B for table B
Form A for Table A
Form B for Table B.
 
Research INNER JOIN for your select statement. It will allow you to get all information from both tables with the ID fields linked. It will be up to you on how you would like to display the data.
 
Back
Top