Solved

Create XML from a dataset using vb.net

Posted on 2014-07-24
2
344 Views
Last Modified: 2014-07-24
I am new to generating XML using vb.net. I have a SQL database and have a stored procedure which pulls out approximately 700 rows and has 5 columns.  I use a SQl dataadapter and then fill the data in the dataset
exampl

Dim 1dataset as DataDs = New DataDS

DataSession.Fill(1dataset , New SqlDataAdapter()  {MyData})

Now my 1dataset  has all the data and I need to create a xml from this. I know I have to use System.xml.serialization  could anyone help please.

Regards

YRKS
0
Comment
Question by:ChanderMadhaviGmail
2 Comments
 
LVL 4

Accepted Solution

by:
Nuno Rogado earned 500 total points
ID: 40218070
Hi,

Dim xmlDS As String = 1dataset.GetXml()
then save xmlDS to a file

or

1dataset.WriteXml("myDataSet.xml")

I hope this answer will help you solving your problem.

Best Regards,
Nuno Rogado
0
 

Author Closing Comment

by:ChanderMadhaviGmail
ID: 40218294
Thanks

I have another question relateing to this. Will post it right away.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

For some reason Google Apps has decided to reserve 'www' for your new domain which results in an error when trying to map the web address 'www' to a certain site in your Google Sites. The error is 'this address is already being used' and after some …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 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