detaching an XmlDataDoc from a DataSet

  • Thread starter Thread starter Corey Wirun
  • Start date Start date
C

Corey Wirun

Hi All,

I've got an XmlDataDocument that is attached to a DataSet with one DataTable
in it. Then I take the XML as text and throw it into a Text Box on a form.

Later on, I wanted to add another DataTable to the DataSet and it
complained:

Cannot add or remove tables from the DataSet once the DataSet is mapped to a
loaded XML document.

How do/can I detach the XMLDataDoc from the DataSet?

Thanks!
Corey.
 
Hi Corey,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to detach the XmlDataDocument
from the DataSet, so that you can add another table to the DataSet. If
there is any misunderstanding, please feel free to let me know.

Based on my research, we cannot detach the XmlDataDocument from the
DataSet. For workaround, we can clone another DataSet and add the new table
to the cloned DataSet. HTH.

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top