How to import XML into SQL Server database?

How to export Microsoft SQL Server data to XML using Visual Basic 6?

  • I want to export the SQL Server data into an XML format using Visual Basic 6. The XML file should be in a particular format so that an external software can import that data into their system

  • Answer:

    Your other option is to bring the data into an ADODB.Recordset, create an MSXML2.DomDocument object, call .Load (and load in a template of the data format you need), use a SelectSingleNode() call to grab the parent element of the data rows, and then iterate through each record of the recordset, adding the appropriate IXMLDomNode to the parent element, with attributes or subnodes set to the data values....

Thayalan at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

If you are using SQL Server 2000 than it supports FOR XML clause. This will help you convert tabular data of SQL Server to XML format

ketur

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.