Write XML To SQL Table VB.Net

Posted on 2014-08-03
Last Modified: 2014-09-12
I have the below XML File in a winforms app.  I need to with it to a sql table


  <Section value="Machine">
    <key name="Box.Enabled" value="True" />
    <key name="Box.InterfacePort" value="Com10" />
      <key name="Box.Speed" value="9600" />
  <Section value="Printer">
    <key name="NeedsFilling" value="False" />

SQL Table

CREATE TABLE Configuration
    Section varchar(255) NOT NULL,  
    [Key] varchar(255) NOT NULL,  
    Value varchar(255) NOT NULL

I need to do this with VB In this program I have a active valid SQL connection

Thank You
Question by:charlesbaldo
    1 Comment
    LVL 9

    Accepted Solution

    You can do this using XmlTextReader. Here is a good write-up, admittedly it is in C#.Net, but the same rules and objects apply: XML to Database using .NET's XmlTextReader

    Good luck!

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now