Making a new DataTable out of an existing one

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
 
S

Scott Allen

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.
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top