Making a new DataTable out of an existing one

  • Thread starter Thread starter Ryan Ternier
  • Start date Start date
R

Ryan Ternier

I'm doing a project where I need to merge 3 Tables within a Dataset into 1
DataTable.

All 3 tables have the exact same rows, except one discription field is a
Varchar(1000) in one, and a text in the other.

What would be the easiest way of doing this.

I know it won't let me copy rows from one to another directly, so I thought
of doing it cell by cell. But there should be an easier way of doing this.


Ryan Ternier
 
Hi Ryan:

You can always use the overloaded version of DataTable.Rows.Add that
accepts an array to pass multiple DataRow objects. Perhaps by using
DataTable.Select on the other table.
 
Back
Top