Hi
Normally I loop through records in a sqlDataReader by:
While MySqlDataReader.Read
...
End While
But in this case where there is no records in MySqlDataReader it is/returns true. When I debug I see it change from true to false and everything is fine. But when I build and run. The program returns with an error insight my while loop. When I debug and only have a break point insight the while loop, the program enter the while loop. I have tried to look at .HasRows, .IsDbNull and used temp. varialbles.
Does anybody have a solution?
Thanks Henrik
Normally I loop through records in a sqlDataReader by:
While MySqlDataReader.Read
...
End While
But in this case where there is no records in MySqlDataReader it is/returns true. When I debug I see it change from true to false and everything is fine. But when I build and run. The program returns with an error insight my while loop. When I debug and only have a break point insight the while loop, the program enter the while loop. I have tried to look at .HasRows, .IsDbNull and used temp. varialbles.
Does anybody have a solution?
Thanks Henrik