473,412 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Dataset back to XML string

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!

--

Matt

"Gravity. It's not just a good idea, it's the law!"
Nov 18 '05 #1
2 1110
MattB wrote:
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/de...tasetasxml.asp

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #2
Craig Deelsnyder wrote:
MattB wrote:
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/de...tasetasxml.asp

Great. Just what I needed. Thanks!

Matt
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: Peter Row | last post by:
Hi all, Here is my problem: I have a SQL Server 2000 DB with various NVarChar, NText fields in its tables. For some stupid reason the data was inserted into these fields in UTF8 encoding. ...
2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
4
by: Filippo Pandiani | last post by:
I have a grid that shows the file list from a folder. On the postback, how do I get a Dataset from this grid? Thanks, Filippo.
1
by: Fleckman | last post by:
I have a situation where I need to add rows to tables with a Parent-Child relationship which presents a constraints violation when I reject the changes. Here is the scenario: I add a row to a...
7
by: Zachary Hilbun | last post by:
The below is some test code to help me learn how to update a dataset. It is supposed to read the value of UserCounter and write it back. The UserCounter is being read correctly as 0, is 1 when...
2
by: Vinod I | last post by:
Hi Team, I want to use DataSet in my ASP.Net application extensively. Scenario is, I am showing Data Set in one of my ASP.Net Page and changing row & column values thru Page. After that I...
0
by: Vijay Balki | last post by:
I am fetching data in DataSet - myDataSet, from a remote database using a Web Service in my VB.NET client..Once I fetch it I store the data in XML file (myXMLFile) using the WriteXML method of the...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
1
by: sjoshi | last post by:
Hi All I have written an Windows Service that exposes a Remoting object that takes a DataSet and fills it up. However when I get the dataset back on the client it's rows are empty. When I log...
1
by: jc | last post by:
RE: Why use a CollectionBase class here vs dataset or dataview? I'm looking at some vb.net 2005 code that was generated from a homegrown Codesmith Template that generate all of the retreival and...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.