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 a static in c#?
When Should You Call The Garbage Collector In .net?
Between windows authentication and sql server authentication, which one is trusted and which one is untrusted?
Is int a struct in c#?
What is the difference between abstract class and interface in c#?
Is java better than c#?
What is cookies c#?
Are tuples mutable c#?
Explain the three services model (three-tier application). Presentation (ui), business (logic and underlying code) and data (from storage or other sources).
What is xor operation?
Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?
What is a hashset c#?
Explain the difference between abstract class and interface.
What does the initial catalog parameter define in the connection string?
The int maps to which C# keyword in .NET type?