Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Error

Author  Topic 

Bright
Starting Member

4 Posts

Posted - 2014-04-05 : 08:34:30
The data in row 1 was not committed.
Error Source: .Net SqlClient Data Provider.
Error Message: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_State_details_Country_details". The conflict occurred in database "SQL", table "dbo.Company", column 'company_ID'.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-04-05 : 12:04:21
You have a foreign key constraint that is preventing the insert. The constraint is there to enforce the parent/child relationship. The parent data does not yet exist, so it won't let you insert the child data.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -