Solved

MS SQL XML output

Posted on 2003-11-28
3
314 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:
mnasman earned 125 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now