To future readers of this question: note that the problem occurred because the OP was returning too many columns in the query. See the comments below this answer.
I'm not quite sure why this is happening, but you really only need to check for rows once, not twice, and the Read()
method already does this.
So all you really need is
while (reader.Read())
{
// Do your thing
}