Hi,
my code is:

DataTable dt = myDataSet.Tables[0];
newDataSet.Tables.Add(dt);

This code generate an error... "tha table dt already belongs to a dataset"...
is there a solution to this problem? namely, I would like to reach this
aim... is there another solution code?

Thanks

Re: TABLE by Norman

Norman
Fri Apr 22 10:18:46 CDT 2005

See comment inline.

"Siu" <Siu@discussions.microsoft.com> wrote in message
news:B5D31EC6-85F9-4E80-ADDF-A87449D4DEA7@microsoft.com...
> Hi,
> my code is:
>
> DataTable dt = myDataSet.Tables[0];

DataTabledt=myDataSet.Tables[0].Copy() //Or
myDataSet.Tables[0].Clone(), if you only need the same table structure, not
the data

> newDataSet.Tables.Add(dt);
>
> This code generate an error... "tha table dt already belongs to a
dataset"...
> is there a solution to this problem? namely, I would like to reach this
> aim... is there another solution code?
>
> Thanks
>