0

I have a need to iterating through 2 tables, first iterate 1 tables and based on its value fetch and iterate the other table. It likes

GetAllEmployeeName

For each employee get and iterate All Sub Employees and do some OPERATION.

Now I am using ADO.NET for this fetching and keeping data.

Since my data are huge i.e the sub-employee are many(around 10,000) to one employee.

And the operation I am doing is quite time taking i.e it also make a web service call for each sub employee.

Should I keep them in a DataSet or SqlDataReader for my case, considering performance and no database locking..

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Akon
  • 272
  • 1
  • 6
  • 20

1 Answers1

0

If you just need to load data, use SqlDataReader. SqlDataAdapter/DataSet allows you to iterate both forward and backward the result, as well modify it. Also, see this: SqlDataAdapter vs SqlDataReader

Community
  • 1
  • 1
Doro
  • 671
  • 1
  • 16
  • 34