DataTable Already Belongs to Another Dataset

I got this error when I was trying to duplicate the datatable.

 

After searching thru internet I found the below easy solution

 

 

 

ds.Tables.Add(new DataTable());

 

 


 

or

 

 

 

ds.Tables.Add(dt.Copy());

 

 

 

 

 

I hope this helps u too…

 

If yes, don’t forget to post your comment.


by admin on December 23rd, 2009 in ASP.Net

There are no comments.

Name*: Website: E-Mail*:
XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>