How to fill a datatable with data from another datatable

G

Guest

Hi, can anyone advice me in the following.

My steps to perform are:
1) Importing data from csv-files into datatables of a typed dataset (the
input tables)
2) I need to fill other datatables based on the datatables in step a (the
output tables)
3) The datatables from step 2 are used to create CR-Reports

My question is: can anyone advice me how to realise step 2: I need to fill
the allready defined, but still empty, datatables from the typed dataset. I
would like to use functionallity like "Select Col1, Col2, Col5 From
DatatableX Where ColId = xxx" to fill the datatables in step 2, but so far I
know this is not possible. Does it make sense to use framework 2.0 instead of
1.1. Woulkd this help? Or does anyone know how to get the (output) datatables
filled?

Btw: performance in this case is important!

Any help is welcome,
Coen.
 
A

Aboulfazl Hadi

Hi
You can use Select method of first datatable to retrieve an array of
selected datarow. you can set filter expression and sorting statement
to get appropriate rows.

then use LoadDataRow method of datatable to load rows into second
DataTable.

I Hope this helps
A.Hadi
 
G

Guest

Hi Aboulfazl, thanks for respond. I have found another way to solve my
problem. I now use the dataview with the rowfilter method. Then I loop
through all the dataview's rows, make for each row a newrow for the output
table, and fill the necessary fields. Maybe not the most eligant way but I
works fine to me.

Anyway, thanks for your cooperation.
Regards Coen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top