Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Data Reader   (RSS)

"There is already an open DataReader associated with this Command which must be closed first" explained

Short one. This sometimes catches people out. When reading a SqlDataReader and then after the read is done, there is an attempt to use the connection that was used for the reading. The exception thrown is (in this case it is thrown when trying to update
Posted by maspeng | 0 Comments
Filed under: ,

Invalid attempt to read when no data is present.

A short one. You are reading data from a data reader, and sometimes you hit: Invalid attempt to read when no data is present. It may seem obvious, but there have been occasions where this error is reported. When checking the code sample below, it is obvious
Posted by maspeng | 0 Comments
Filed under:
 
Page view tracker