Link to home
Start Free TrialLog in
Avatar of DragonWolf
DragonWolfFlag for United Kingdom of Great Britain and Northern Ireland

asked on

XML to MS SQL Server

Hi,
    I am using Visual Basic 6.0 and I have incoming XML documents that I want placing in a database. Currently the database is on MS SQL Server, though I may need to change this at a later date.
    I can think of plenty of ways of importing the XML into a database, but I'd like to ask if anyone has an efficient way of doing this.
   
    The current method I'm using is turning XML into an SQL Queries. This means that the query can now be made on any database. I can use either XSL or an object library (currently using XSL) to convert the XML to SQL Queries.
    And then connecting to the MS SQL Server and executing the query.

    Thanks
Avatar of DragonWolf
DragonWolf
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I'm using the MSXML library using the DOM data structure and DOM transformation to implement the XSL on the XML.
Avatar of Anthony Perkins
If all you want to do is save the XML document in SQL Server than all you need is to write a Stored Procedure and pass the XML document as a parameter or use the Stream object.

Anthony
ASKER CERTIFIED SOLUTION
Avatar of mdougan
mdougan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i think the best way is to open a recordset using the XMl file & then execute the insert into statement to insert in the SQL Server.