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 hashtable and dictionary?
What are access modifiers used for?
What are anonymous functions in c#?
What is a generic in c#?
What is clr in c#?
How do you specify a custom attribute for the entire assembly?
What is private class in c#?
What does return do in for loop?
What is polymorphism c# example?
What is asp net c# corner?
Does c# support a variable number of arguments?
What is application c#?
In which order the destructor is called for an inherited class?
To allow an element to be accessed using a unique key which .NET collection class is used ?
Explain dataadapter.update method in .net?