开发者

Which DataSet creation technique is faster?

Which one of these techniques is faster?

1)

DbDataAdapter dataAdapter = _factory.CreateDataAdapter();
dataAdapter.SelectCommand = _command;

dataSet = new DataSet();

dataAdapter.Fill(dataSet);

2)

DataTable dt = new DataTable();

IDataReader iDataReader= _command.ExecuteR开发者_StackOverfloweader();

dt.Load(iDataReader);

iDataReader.Close();


Have a look at these links

DataReaders, DataSets, and performance

and

DataAdapter.Fill preferable to DataReader?

As mentioned in the comments to your question. It would be best to test for the given situation at hand, there is never a one rule applies to all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜