ADO vs DataSet and DataTables

.net, ado

Solution

ADO is the way you actually get the data.

I think you're mixing things up here.

A Dataset is basically an in memory representation of the data you just pulled and it is okay for smaller result sets, but for anything large it should probably be avoided.

edit:

Also wanted to add, for larger result sets, Generic Lists populated via Datareaders will help you as far as performance goes.

For an example about datasets, I had to rewrite a report which was taking over 9 hours to run. It was a console application that was generating a CSV. Anyway, the programmer loaded 1.4 million records into a dataset, then did a for each loop through each row. Not only did this take close to 10 hours, but it ate up 4 gigs of memory while running.

After removing the dataset the report now runs in under 5 minutes and takes up about 20 megs of memory.

Just an example.

Problem

So I didn't see the answer to my question: Is there a difference (performance or otherwise) between ADO vs. DataSet? If so, which is more common?

Original source