Wednesday, October 30, 2013

How to fetch all separated result in Stored Procedure with While Loop


Hello Sir Latheesh,


I made it all fetched by using .NextResult and Do While loop :



Do
While sqlReader.Read
drow("col") = sqlreader("col")
End While
Loop While Me.sqlReader.NextResult



Thank you Sir for your attention.


- Charlie




Its nice to see that you could do it using ONE MORE loop in application layer. But still my point exists, you will have performance issues with your approach, may be not today, but for other day (due to less number of records now). Just think of a scenario, you are returning thousands of records , you will end up with looping the records twice.


Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.


No comments:

Post a Comment