How to insert values when tables are linked by foreign keys?

ToveBrolvenon

New Member
So I have four tables having the following fields\[code\]Student_Master---------------------Student id(Primary Key)Student NameClass IdDocument Upload\[/code\]\[code\]Student Marks------------Marks_IdStudent_Id(Foreign Key)Subject_ID(Foreign Key)Marks\[/code\] \[code\]Subject-----------Subject IDSubject Name\[/code\]\[code\]Class----------Class IDClass Name\[/code\]And my form on the page has following fields:\[code\]Student NameClassSubjectMarksDoc Upload\[/code\]Now how do I insert the values into multiple tables and they have foreign key references in between them.The project is in ASP and I am using SQL Server
 
Top