Dataset back to XML string

M

MattB

I get a dataset passed as a string in my application (passed from a c++
dll) and I convert it to a usable dataset like this:

Dim XMLRead As New System.IO.StringReader(lcXML)
myDataSet.ReadXml(XMLRead)

ItemGrid.DataSource = myDataSet.Tables.Item(1)

ItemGrid.DataBind()

My question is: how do I do the reverse? Now I need to turn it back into a
string. The few things I've tried don't quite work (using a StringWriter).
Can anyone give me a quick example? I thnk I'm pretty close. Thanks!
 
C

Craig Deelsnyder

MattB said:
I get a dataset passed as a string in my application (passed from a c++
dll) and I convert it to a usable dataset like this:

Dim XMLRead As New System.IO.StringReader(lcXML)
myDataSet.ReadXml(XMLRead)

ItemGrid.DataSource = myDataSet.Tables.Item(1)

ItemGrid.DataBind()

My question is: how do I do the reverse? Now I need to turn it back into a
string. The few things I've tried don't quite work (using a StringWriter).
Can anyone give me a quick example? I thnk I'm pretty close. Thanks!

from MSDN:
http://msdn.microsoft.com/library/d...-us/cpguide/html/cpconwritingdatasetasxml.asp
 

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

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,083
Members
48,773
Latest member
Kaybee

Latest Threads

Top