In c#.Net Application For DataGridview binding which method is faster in below two case?Why..?
1)looping-Using For loop
2)Databinding direct using Dataset
Answers were Sorted based on User's Feedback
Answer / velmahesh
Answer is , Databinding direct using Dataset..
Reason for if we store database values to dataset. then
values are binding shortly..
but, if use the for loop, that statement will execute
upto limit. so, it will take some seconds..
Is This Answer Correct ? | 9 Yes | 2 No |
Answer / shir
Using for loop is faster since the data will be populated as
soon as it is read using the data reader which is one way
read only process.
But when data set is used,
1. It internally makes use of the data reader in order to
populate the data set.
2. It takes huge amount of data enire amount of which might
not be required.
3. Later we will have to iterate throught DS to fill the
data grid
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / hardit
if we are using " reader " in data retrieving ,it will be faster as it will only read values required.
but in the case of dataset which is a very heavy object it will take more time corresponding to reader in for loop.
Is This Answer Correct ? | 0 Yes | 4 No |
How many types of constructors are there?
Can hashtable have duplicate keys in c#?
How you will create satellite assemblies?
Which is better javascript or c#?
What is xaml file in c#?
Why do we use constructors in c#?
How we can create an array with non-default values?
What is clr namespace?
WHAT IS THE DIFFERENCE BETWEEN STRING AND STRING BUILDER ?
Can we extend static class in c#?
What is the purpose of dependency injection?
What is the difference between list and array in c#?