Answered by:
DataSet and DataReader

Question
-
Hello
I want to know that which is more beneficial in DataSet or DataReader as per execution speed.
Tuesday, January 25, 2011 11:16 AM
Answers
-
DataSet will get the entire data at once, while using DataReader you can read record by record.
Some comparisons
http://www.eggheadcafe.com/articles/20030205.asp
http://msdn.microsoft.com/en-us/library/ms978388.aspx
http://articles.sitepoint.com/article/dataset-datareader
Thanks,
A.m.a.L
[MVP Visual C#]
Dot Net Goodies
Don't hate the hacker, hate the code Tuesday, January 25, 2011 11:26 AM -
The DataReader is much much faster. The DataSet reads and carries over the table(s) schema which contributes heavily to the overhead.
Adam
Ctrl+ZTuesday, January 25, 2011 1:43 PM
All replies
-
DataSet will get the entire data at once, while using DataReader you can read record by record.
Some comparisons
http://www.eggheadcafe.com/articles/20030205.asp
http://msdn.microsoft.com/en-us/library/ms978388.aspx
http://articles.sitepoint.com/article/dataset-datareader
Thanks,
A.m.a.L
[MVP Visual C#]
Dot Net Goodies
Don't hate the hacker, hate the code Tuesday, January 25, 2011 11:26 AM -
The DataReader is much much faster. The DataSet reads and carries over the table(s) schema which contributes heavily to the overhead.
Adam
Ctrl+ZTuesday, January 25, 2011 1:43 PM