?
Solved

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

Posted on 2006-11-07
2
Medium Priority
?
379 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Assisted Solution

by:prajapati84
prajapati84 earned 400 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 1600 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

770 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