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 wildcard character in sql?
Are structs value types c#?
What is inline function in c#?
How will you get the different language strings?
Give an example of a directcast.
What is the difference between proc. Sent by val and by sub?
What is singleordefault?
How to prevent the error while updating ui control from another thread?
How do you serialize an object?
Is comparable a functional interface?
What is JIT (just in time)? how it works?
Is var a data type?
What is the benefit of dependency injection c#?
Can the accessibility of a type member be greater than the accessibility of its containing type?
What are custom exceptions? Why do we need them?