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 predicate in c#?
What is out int in c#?
What is difference between il and dll ?
Why do we use threads in c#?
What are circular references?
Why var is used in c#?
What are partial types in c#?
Why linq is having select clause at the end?
What is a template class?
What is the task perform by clr?
What is the difference between == and object.equals?
How do I port "synchronized" functions from visual j++ to c#?
Explain data types in c#?
What is the use of readkey in c#?
Can we instantiate abstract class in c#?