Solved

what is the best way to read a dataset.getXml() string into another dataset object?

Posted on 2006-11-07
2
374 Views
Last Modified: 2012-06-22
what is the best way to read a dataset.getXml() string into another dataset object?
0
Comment
Question by:joshuadavidlee
2 Comments
 
LVL 5

Assisted Solution

by:prajapati84
prajapati84 earned 100 total points
ID: 17896006
You can use for serialization and deseralization. Actually first write urDataset to a stringwriter and then read this stringwriter using stringreader and then read this string reader using Dataset.ReadXml method. So, finally you can readxml into other dataset.

' Serialization
Dim sw As New System.IO.StringWriter
ds1.WriteXml(sw)
Dim mystring As String = sw.tostring

'Deserialization
Dim sr As New System.IO.StringReader(mystring)
Dim ds2 As New DataSet
ds2.ReadXml(sr)

Regards,
Mukesh
0
 
LVL 3

Accepted Solution

by:
rugu_16 earned 400 total points
ID: 17899853
this should work just fine

            string s = ds.GetXml();
            System.IO.StringReader r = new System.IO.StringReader(s);
            dataset.ReadXml(r);

helpful article

http://www.thescripts.com/forum/thread383280.html



0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question