detaching an XmlDataDoc from a DataSet

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.
 
K

Kevin Yu [MSFT]

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."
 

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