The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ERP_AssetIssue_ERP_GatePass". The conflict occurred in database "ERP_ASSETS_NFA", table "dbo.ERP_GatePass_Old", column 'GPID'.
The statement has been terminated.
Asked
Active
Viewed 20 times
1
Krsna Kishore
- 8,233
- 4
- 32
- 48
-
Possible duplicate of [INSERT statement conflicted with the FOREIGN KEY constraint](http://stackoverflow.com/questions/2965837/insert-statement-conflicted-with-the-foreign-key-constraint) – Suprabhat Biswal Oct 01 '15 at 06:18
1 Answers
0
In your table dbo.ERP_GatePass, it has a foreign key reference to another table. The FK works is it cannot have a value in that column that is not also in the primary key column of the referenced table.
You can Rectify or findout using this following way Source
Community
- 1
- 1
Krsna Kishore
- 8,233
- 4
- 32
- 48
-
@Ananda Somewhere you are sending a value as `0` that has foreign key relation with the primary key column – Krsna Kishore Oct 01 '15 at 06:25