XMLDataDoc against multi-tbl DataSet

C

Corey Wirun

Hi All,

If I have a DataSet with multiple DataTable's in it, is it possible to 'see'
any arbitrary table when I create a XmlDataDocument from the DataSet? It
appears when I load the DataSet and try and look at the OuterXml on the
XmlDataDoc, all I see is the first DataTable.

e.g.
XmlDataDocument xmldoc = new XmlDataDocument( ds );
txtXML.Text = xmldoc.DocumentElement.OuterXml;

I can see all the tables, of course, via the DataSet.Tables member...

Thanks in Advance.
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 only one table is put to
XmlDataDocument when multiple DataTables are available in the DataSet. If
there is any misunderstanding, please feel free to let me know.

I have tested the code on my computer, however, I cannot reproduce it. When
I put two tables (Customers and Orders) of Northwind to a DataSet, and
create an XmlDataDocument with that DataSet, all data for the Customers and
Orders can be seen in the TextBox. Could you please try to repro it with
the Northwind database? If it can be reproed, could you show us all the
code that fills DataSet and create the XmlDataDocument?

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

Corey Wirun

When I was preparing a code snippet for you, I found the problem, it had to
do with the XmlDataDocument property I was using to get the XML text out. I
should have been using XmlDataDocument.DocumentElement.OuterXml.

So I'm okay now.

Thanks for your reply.

C.
 
K

Kevin Yu [MSFT]

Hi Corey,

It was nice to hear that you have had the problem resolved. Thanks for
sharing your experience with all the people here. If you have any
questions, please feel free to post them in the community.

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