Click here to Skip to main content
15,851,387 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
sir as i have used relationship in my sql server database. So when i want to put the foreign key column null (or empty field) it gives me Error:-

.Data Error.The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Empinfo_ScaleMaster". The conflict occurred in database "D:\VBNETPASH\PAYROLLSYSTEM1\PAYROLLSYSTEM\BHARA.MDF", table "dbo.ScaleMaster", column 'Code'.
The statement has been terminated.


sir i want to keep foreign key column null.so how can i put null . Is it necessary to put one value available in the primary key table
Posted
Comments
Varun Sareen 20-Feb-12 5:10am    
5+, very good question

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900