What is the best method to fill the GridView. using
SqlDataReader or Dataset and why
Answer Posted / vasanth
Dataset is the better option then datareader. Since dataset is disconnected, once data can be fetched and stored in dataset and then disconnect the connection and then you can bind to gridview.
In Datareader you are fetching each row and you are binding. So in middle if connection goes off, then half of the data is binded to gridview.
So dataset is better then datareader.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between properties and indexer in c#?
What does return do in unity?
Can you prevent a class from being instantiated?
Write a console application and implement the ternary operator to decide whether the age a user entered after being prompted is allowed to vote or not(given that only citizens between 18 and 120 years only inclusive can vote). Use exception handling for non-numerical input.
Does c# support a variable number of arguments?
What is pure abstract class in c#?
What is the benefit of interface in c#?
Is post back in c#?
Why is it not a good idea to use empty destructors?
What is difference between ienumerable and list?
What does type safe mean in c#?
How much time will it take to learn unity?
What do you mean by for each loop?
Explain the ways to deploy an assembly?
What is parameter c#?