Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best approach for reading in XML data and building a query to insert the values into a SQL Server DB?

Tags:

c#

.net

sql

xml

What's the best approach for reading in XML data and building a query to insert the values into a SQL Server DB?

Anyone have a best approach for this type of scenario?

like image 256
strickland Avatar asked Feb 14 '09 04:02

strickland


2 Answers

Personally, I use a DataSet.ReadXML(). Then it places all the data into DataTables in the DataSet and then is much easier to loop through and manipulate the data.

like image 72
Ron Savage Avatar answered Nov 01 '22 11:11

Ron Savage


SQL 2005 has very good xml capabilities. This is one technique using XML Parameters

like image 22
Gulzar Nazim Avatar answered Nov 01 '22 10:11

Gulzar Nazim