Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Exception Details:
System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException: Operation is not valid due to the current state of the object.


Source Error:
Line 871:				if (this._Login_Detail.HasLoadedOrAssignedValue)
Line 872:				{
Line 873:					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
Line 874:				}
Line 875:				this.Onlog_id_fkChanging(value);
Posted
Updated 28-Mar-15 8:10am
v2
Comments
Nathan Minier 25-Mar-15 7:54am    
Not enough information or context to offer any advice.
Member 11428137 28-Mar-15 16:01pm    
It looks like the code is doing exactly what it's supposed to be doing.
What's the problem?

1 solution

There is nothing wrong with this code!
You asked to throw an exception of ForeignKeyReferenceAlreadyHasValue whenever HasLoadedOrAssignedValue resolves to true...
And that's what happening...
 
Share this answer
 

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