Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS SQL XML output

Posted on 2003-11-28
3
Medium Priority
?
327 Views
Last Modified: 2013-11-23
Can someone show me how to dump a MS SQL2000 table structure and data into a XML file format?

Thanks.

Jammy
0
Comment
Question by:jlislo
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 500 total points
ID: 9840498
Hello

  The Ado components allow to save the data as example, drop AdoDataset components and set the connectionstring property to use the northwind database, the write this code, it will save the structure and data in xml file

  adodataset1.CommandText := 'select * from customers';
  adodataset1.Open;
  Adodataset1.SaveToFile('c:\test.xml',pfXML);

also the TClientDataset allow the data to saved as xml, you can add DataSetProivder to connect to the AdoDataset, and ClientDataset and connect to the DatasetProvider and add this line
  ClientDataSet1.SaveToFile('c:\test1.xml',dfXMLUTF8);

Regards,
Mohammed
0
 

Author Comment

by:jlislo
ID: 9844420
I got the data in XML format. Is there any way to export the structure into XML? Thanks
0
 

Author Comment

by:jlislo
ID: 9844426
Sorry my fault, data and structure all in one XML file. Thanks.
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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview

824 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