Asp.net Sqlexception: The INSERT statement conflicted with the FOREIGN KEY Constraint

Asked

Viewed 222 times

2

There is a question similar to this one, but it’s different ..... my doubt is where to find where it gets this information.. is it in the view form? or controller?

There are several Partials views that pass information to the same controller, such as find, which is causing this error?

Sqlexception: The INSERT statement conflicted with the FOREIGN KEY Constraint "Fk_dbo.Laudoes_dbo.Developments". The Conflict occurred in database "Engosengenhariacontext-20180626101342", table "dbo. Enterprises", column 'Enterprise'. The statement has been terminated.

1 answer

2


Error occurred in your back-end (Server).

Apparently, at the time of insertion, you are trying to reference an ID that does not exist in the Enterprise table. Make sure the ID you are trying to reference is already registered

  • 1

    I found that when I hit the create it’s passing the data all null

Browser other questions tagged

You are not signed in. Login or sign up in order to post.