BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


SQL XML
History Of XML
History Of XML And What Is XML.
Order Automation
You enjoy while you are away and let your machine do the job for you.
SQL Server 2000 User Defined Functions - A Powerful concept
XML/XSLT Maker
Generic ADO recordset to HTML table using XML / XSL
How to display the first three nodes of a XML file with XmlDocument?
What is the usage of the XmlDataDocument?


 
 

<< SEOSystem.XML >>


By John Workman
First Posted 04/21/2003
Times viewed 205

SQL straight to XML w/ transform


This post contains attachments
v20030421215913.zip 

Summary Very Simple!!! This VB code uses the northwind db to demonstrate how to write SQL directly to XML. It also shows how to call a transform prior to writing the XML to a file.

This VB code uses the northwind db to demonstrate how to write SQL directly to XML. It also shows how to call a transform prior to writing the XML to a file. This is the simplest way I've found to do this without looping through the record set, writing each line. ' Write to XML Set rsRecordset = sqlCommand.Execute() rsRecordset.Save XMLFile, adPersistXML OR 'Save XML stream then Transform rsRecordset.Save objADOStream, adPersistXML XSLDoc.Load (XSLFile) fFile.Write objADOStream.transformNode(XSLDoc) ' SEE FULL CODE BELOW

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< SEOSystem.XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML