Copy table

  • Thread starter Thread starter Poppy
  • Start date Start date
P

Poppy

I have a dataset which contains a table which holds 4
columns.

I want to copy column 2 and 3 into a new table with their
contents.

How ?
 
Poppy,

I think you'll have to resort to foreach and insert manually values into new
rows.
 
Poppy,

I never did it however I think I would just try it like this
\\\
Dim mytable2 As New DataTable
mytable2 = mytable1.Copy
mytable2.Columns.Remove("column1")
mytable2.Columns.Remove("column4")
///
etc, when it are a lot in a loop using the index and not doing 2 and 3

I hope this goes?

Cor

"Poppy"
 
Back
Top