TABLE

G

Guest

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
 
N

Norman Yuan

See comment inline.

Siu said:
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
 

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

Top