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


Please Help Members By Posting Answers For Below Questions

List down the different ide’s provided by microsoft for c# development.

562


Contrast System.String and System.Text.StringBuilder classes?

603


Is an interface a type c#?

620


What is sqlcommand in c#?

576


What is a copy constructor in c#?

588






How does dictionary work in c#?

556


List some of the classes used by system.data namespace?

520


How do I declare inout arguments in c#?

630


Value Type and Reference Type Data type in C#?

623


is it possible to access a remote web service Without UDDI?

642


What are the different ways of method can be overloaded?

557


What are the string functions in c#?

610


How does insertion sort work?

601


What does == mean in c sharp?

600


If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?

631