HasRows logic flaw
Well maybe the title of this post is a bit strong. It's not really a flaw, but something occurs to me today using this new Datareader property.
If you use Hasrows it doesn't mean that you have indeed read any data !
I know it looks strange, but Hasrows is just there to check that some data are in your reader.
What is the point to open a datareader, tell me that I have rows, and not reading the data ;-)
Where is the logic of this ?
So unless someone tell me I am a stupid man (and I am surely going to receive hundreds of comments with something like that ;-)) I stay with the 'old' version of my code which test and read the first record in the same time:
If MyDataReader.Read then
...
End If
So if someone has a real use for Hasrows, tell me !