markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

DataReader is closed. #256

Closed mSkal closed 11 years ago

mSkal commented 11 years ago

Hi, I had a problem. I do not know why it happens. I get exception from method MoveNext on Simple.Data.Ado.DataReaderEnumerable, "Invalid attempt to call Read when reader is closed". I found in this method that there is only check on _reader null reference. Adding "|| _reader.IsClosed" helped me. Please check this and consider my change. Code is running under IIS as a web site, issue was not necessitarian.

Cheers, Michal