Transforming from one dataset to another...

  • 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
 
If the data is the same, just fewer/different rows, why not just create
another adapter and fill your second dataset wtih da2.Fill
 
William,

I have already made my own dataadapter to do this.
On myAdap.Fill(ds) I simply whizz through all the rows in the origianl
dataset, and make a transformation (IE: some fields are concatenated etc)..

If this is the best way to do this, I am doing it already.. Just a bit slow
when traversing 5000+ rows..

Steve
 
Back
Top