; Insert a XML file in SQL server "Database" with C#.net | SQL Server

Big Entertainment On Demand

Download APK  - Visit Here

Insert a XML file in SQL server "Database" with C#.net


Know More :  ASP.Net  VB.Net  C#.Net  Sliverlight  XML  WPF  WCF Ajax






























using System;
using System.Data;
using System.Xml;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;

namespace Xml_to_database_insert
{
    public partial class Form1 : Form
    {
        DataTable dt;
        DataRow dr;
        public Form1()
        {
            InitializeComponent();
        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            string l = "D:\\RAPL\\RAPLStaff.xml"; // your xml file path.
            DataSet dtk = new DataSet();
            FileStream fstr = new
       FileStream("D:\\RAPL\\RAPLStaff.xml", FileMode.Open,
FileAccess.Read);
            dtk.ReadXml(fstr);


            // string myfile = "c:\\D.xml";
            oleDbDataAdapter1.Update(dtk);
            MessageBox.Show("Data loaded");
        }
    }
}
Know More :  ASP.Net  VB.Net  C#.Net  Sliverlight  XML  WPF  WCF Ajax
Share on Google Plus

About Sujay

Hi ! I am Sujay Sharma. I am working in Indian Railway as Guard. I am sharing my experience about Microsoft SQL Server with ASP.NET ,VB.NET,C#.NET,XML "" Thanks.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment