Click here to Skip to main content
15,921,643 members

Comments by Jordan Nash (Top 17 by date)

Jordan Nash 20-Feb-22 2:06am View    
Hi I have swapped the images as they were in the wrong href tags.
Jordan Nash 22-Aug-21 3:33am View    
So I read this https://docs.microsoft.com/en-us/visualstudio/debugger/debugger-feature-tour?view=vs-2019#set-a-watch
Then set watches on JobID and ID in the controller.

The strange thing is if I get out of the page and go back to it I notice when I debug that the ``JobID`` is being passed to it fine but then I unassign the user (delete the registration) and assign them again. That's when 0 is assigned to JobID. If any mentor is willing to Teamview or something with me please PM me and I can workout some sort of payment for your time. Else please advise me how I should debug further, thanks.
Jordan Nash 20-Aug-21 4:34am View    
So I have used breakpoints and found the JobID returned as 0. Other than that I cannot find why I'm getting this error. I have displayed the migration in my question today where I'm getting the error from FK_tblRegistration_tblJob_JobID
Jordan Nash 17-Aug-21 2:31am View    
This problem gets even stranger. So when I use that code you made to check for null in the action, the error will be gone now regardless of which record it is. so I swapped my original line for yours. But if I assign a user now, I will get this error.
```
An unhandled exception occurred while processing the request.
SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblRegistration_tblJob_JobID". The conflict occurred in database "Pitcher8", table "dbo.tblJob", column 'ID'.
The statement has been terminated.
```
Jordan Nash 12-Aug-21 7:21am View    
Already did all that as explained. I cannot see anything out of the ordinary other than what I said. Here is a gif I'm sharing if you can see what I'm doing wrong, please. https://s6.gifyu.com/images/Animation1cff8e6cf7f6fdd3d.gif