Solution to: System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.

from an internet website: a datareader represents an open connection to the database. to run 2 readers simultaneously, you need to use two seperate connections. #1 just change your connection string to add it back (add MultipleActiveResultSets=True to connection string).http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=123691&SiteID=1 NO SOLUTION #2 new Connection on every GetConnection() --> no singleton NO SOLUTION ERROR: Invalid attempt to MetaData when reader is closed. #3 connectionstring always another! NO SOLUTION ERROR: Invalid attempt to MetaData when reader is closed. #4 BackgroundWorker solves the problem!

Latest Posts

Popular Posts