There is already an open data reader associated with this command which must be closed first
The开发者_JAVA百科re is already an open data reader associated with this command which must be closed first.
due to some foreign key error this error occurred and then my application works fail.how can i rid of this type of bug.
If error occurred than linq object automatically closed for that session but it reflect all sessions of application .
In general if the command is not closed means, use the following code:
commandobject.Close();
精彩评论