SqlDataReader reader = cmd.ExecuteReader();
...And beginning a loop with the reader.
while (reader.Read())
and when I step through the code, I get this:
Quote
InvalidOperationException was unhandled by user code
"Invalid attempt to call Read when reader is closed."
"Invalid attempt to call Read when reader is closed."
Why? And how do I fix it?
Is there something else I can do to "open" the reader?
I've already opened my SqlConnection with:
myConnection.Open();
What am I missing?

New Topic/Question
Reply




MultiQuote







|