IDataReader and ExecuteDataSet

Mar 16, 2010 at 11:54 AM

I am using EntLib for my C# application.

Im my Data Access Layer, I made like that :

Database dtBase = DatbaseFactory.CreateDatabase();
using (DbCommand com = dtBase.GetSqlStringCommand("select * from customer"))
     using (IDataReader = dtBase.ExecuteReader(com))
          // code

But, is it faster using dtBase.ExecuteDataSet() ?

Which is the fastest between ExecuteReader and ExecuteDataSet ?

Thank you !


Mar 17, 2010 at 6:54 AM

Hi Sancha,

I think it still depends, since performance should always be weight by considering all factors within the application.  

Though, if in terms of we're just only comparing the two without any other things to consider, from a nutshell ExecuteReader is faster than ExecuteDataSet. This article ( may give you more insight.