Transforming between datasets.

  • Thread starter Thread starter SPG
  • Start date Start date
S

SPG

Hi,

I have a dataset containing one table with plenty of rows (>5000).
I need to convert these to fit into another set of rows in the quickest
possible way.

I know what fields I will be getting in, and what fields need to be
converted to make the output dataset, but am tryingto find the quickest way
of doing this.

I am toying with the idea of my own DataAdapter, with the Fill method doing
the transform. The only way I can think of doing this is to loop through all
rows doing the conversion on each row and passing that as a new row to my
new dataset.

There has got to be a better way! Surely??

Steve
 
I don't see how creating a DataAdapter will help with performance. And what
kind of conversion do you need? If you have to apply some custom conversion
logic on each row, then seems likely you'll have to loop on the rows
manually. No matter what (whether you do the looping or you use
serialization or something to push things around) it is an O(n) operation,
no?

Brad Williams
 
Back
Top