views:

707

answers:

3

Using VB.NET, how do I add the values from an XML file into an SQL Server database with a similar schema?

A: 

I don't know the methods off the top of my head but you ought to be able to load the file into a DataTable and then use ADO.net to get it into the database (look into the SqlBulkCopy class if you're using a SQL Server DB).

This ought to get you enough words to punch into and find a good example.

AlexCuse
A: 

Easiest way is using the DataSet class's ReadXml() method. Then, as the user above mentions, the dataset contains one (1) DataTable. It's pretty easy to get that into SQL.

A: 

Use an XSL Transform to create an insert statement.

mmcglynn