[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

Write XML To SQL Table VB.Net

I have the below XML File in a vb.net 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
Charles Baldo
Charles Baldo
1 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now