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
How to find methods of a assembly file (not using ILDASM)?
What are fields in c#?
How does bitwise xor work?
What is the difference between system.text.stringbuilder and system.string?
Can an abstract class inherit from another abstract class c#?
What is data hiding in c#?
What is main thread in c#?
Explain the difference between arraylist and array and in c#?
What are logical operators in c#?
How to properly clean up excel interop objects?
Can you have more than one namespace in c#?
Classes and structs can be declared as static, is this statement true or false?
Explain “static” keyword in c#?
What is inheritance in csharp?
What does namespace mean?