I know I can use while(dr.Read()){...}
but that loops every field on my table, I want to retrieve all the values from the first row, and then second... and so on.
Let's say I have a table like this:
ID--------------Value1--------------Value2------------------Value3
1 hello hello2 hello3
2 hi1 hi2 hi3
first I want to get, hello
, hello2
and hello3
and then go to the second row and get all the values.
Is there a way to achieve this? I hope somebody understand what I mean.
I am so sorry, this is solved now. I just wasn't coding right...
And yeah the SqlDataReader.Read() method does what it is supposed to do, again the mistake was mine.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…