foreign key conflict Unable to insert data

rangsun

New Member
I have two tables having following fields:Table 1 : Student MasterFields : \[code\]stu_id(primary key)nameclassdoc uploadsub_id(foreign_key)\[/code\]Table 2: SubjectFields : \[code\]sub_id(primary key)subject name\[/code\]But when I insert the entries in the form it gives the following error.\[quote\] The INSERT statement conflicted with the FOREIGN KEY constraint "FK__student_m__sub_i__0C85DE4D". The conflict occurred in database "test2", table "dbo.subject", column 'sub_id'**\[/quote\]Kindly help where am I wrong??
 
Back
Top