The
SqlDataReader
is a reader class, which implies you need to actually run read operations on it before you can access any of the data returned from the SQL. That's exactly what your exception is telling you, you're attempting to read when there's nothing there to read yet.
Make sure you call
sdr.Read()
and check the result of this method (a boolean) before you try and access the data:
if (sdr.Read()) {
}
while (sdr.Read()) {
}