XMLDataDoc against multi-tbl DataSet

  • Thread starter Thread starter Corey Wirun
  • Start date Start date
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.
 
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."
 
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.
 
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."
 
Back
Top