I want to know which one has the better performance for returning a DataTable
. Here for SqlDataReader
I use DataTable.Load(dr)
In addition to the selected solution, I would like to add that:
Using the DataReader, you don´t need to know which type of DbConnection you have.
All you need is an instance which implements IDbConnection, with that you can use "connection.CreateCommand" and then "dbCommand.ExecuteReader" and then dataTable.Load.
But when you use DataAdapter you will need to know which connection is used (i.e. oracle, sqlserver, etc.)
(It´s not relevant for the thread starter, but I landed here using g**gle while looking for this topic.)