p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Pro VB 6 (http://p2p.wrox.com/forumdisplay.php?f=73)
-   -   How to export the data to XML file format? (http://p2p.wrox.com/showthread.php?t=54761)

mbshankar March 1st, 2007 11:48 AM

How to export the data to XML file format?
 
I have to export the recordset data to XML file in my vb 6.0 application.

XML file should be in predefined XML format and XDR file is also given along with that.I am using MSXML to do this.

I was wondering if anyone can suggest a better way to do this.





seananderson March 13th, 2007 10:19 AM

If it's coming from SQL, you could investigate the use of "FOR XML AUTO" in the query. I am by no means any expert with this, but have used it a little in the past and know that it can produce basic forms of XML.

Regards,

Sean Anderson

Raghunathan April 3rd, 2007 12:22 PM

hi

If You Are Using ADO Recordset Object then the job is simpler

'fill the records from the database table into a ADO Recordset for example rsEmployees

'write the following piece of code to get the xml document from the recordset object along with a Schema

rsEmployees.Save "C:\Data.xml",adPersistXML

thats all u will have the xml format of the recordset data stored in the file C:\Data.xml

hope this wud help u solve the above problem..



Regards,
Raghu


All times are GMT -4. The time now is 12:02 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.