Follow @RoyOsherove on Twitter

DataReader.HasRows

One of the annoying things in version 1.0 of the .net framework was regarding the DataReader (Ole DB or SQL) class. You had no way of knowing whether the reader you got was pointing to any data or has no rows. You had to manually try to read from it and check if nothing had been returned. Very flaky.

 

Apparently it is not common knowledge beacause someone asked me this, but  In v1.1 this has been sorted out. Every DataReader object now has a HasRows property that returns a Boolean. Phew!

Nasty bug in Data Access Block Ver. 2.0

Filling typed datasets using Data Access Application Block v.2.0