how to copy columns into other table

  • Thread starter Thread starter =?ISO-8859-1?Q?Tomasz_Dre=DFler?=
  • Start date Start date
?

=?ISO-8859-1?Q?Tomasz_Dre=DFler?=

Hi.

I am look for a smart way to copy dataColumn's form one table to an other.
I try to copy all primary key columns to an other table as foreign key
columns.

-> dtNew.Columns.AddRange(dtOld.PrimaryKey) (pseudo example)
This of cause don't work because dtOld.PrimaryKey(0).Table contains
a reference to dtAlt dataTable.



Any Idea?

Greetings Tomek
 
Hi Tomasz,

The datacolumn does (with execption from a 1 column table) not exist as
dataitem.

In my opinion you have to loop through your old table to copy it.
(And do not do it direct because than you are setting the references and the
values are still in the original).

Cor
 
Cor said:
Hi Tomasz,

The datacolumn does (with execption from a 1 column table) not exist as
dataitem.

In my opinion you have to loop through your old table to copy it.
(And do not do it direct because than you are setting the references and the
values are still in the original).

Cor
Hi Cor.
thanks for answer :)
I did it so.

*Tomek*
 
Back
Top