I'm using LINQ to SQL to write information at a rapid rate to the same table via calls to a web page. At the same time there is a web service providing results from that table. So far the best info I've found on this lies here: http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx
- Invalid attempt to call MetaData when reader is closed
However, this looks like it's going to be a hard problem to solve.
Need to try adding the following to my connection string declaration:
Subsequently hit this error as well:
- There is already an open DataReader associated with this Command which must be closed first.
Reason given in this forum post was: This is due to a change in the default setting for MARs. It used to be on by default and we changed it to off by default post RC1. So just change your connection string to add it back (add MultipleActiveResultSets=True to connection string).
MARS stands for Multiple Active Result Sets.
Not sure what I'm doing with this data base at the moment, plenty of errors that need investigating:
- ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
- A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 18 - Connection has been closed by peer)
- A severe error occurred on the current command. The results, if any, should be discarded.
- A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)