Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.net and XML

Status
Not open for further replies.

joemal

Programmer
Feb 12, 2003
13
MT
I am trying to build an XML file from an SQL2000 database to output it as a file. Can anyone help?

I have a pre defined standard of the XML output.

Thanks
 
Run your SQL query with the "FOR XML AUTO" clause. You'll get back a single string that has the results of your query as XML.

You can then use a standard StreamWriter object's Write() method to send it to a file.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top