Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to storage the records of DataSet to MSSQL table?

How to storage the records of DataSet to MSSQL table?

Scheduled Pinned Locked Moved Database
sql-serverquestiondatabasesysadminxml
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jingya_feng
    wrote on last edited by
    #1

    Hi, The records of the DataSet were loaded from Web Service. I wanna save the records to MS SQL Server table. How can I do? I get a idea: Save the data to xml documents by WriteXml() method, and load the data from xml into SQL Server table. If I do like this , how can I load the xml's records into table? Thanks!

    A 1 Reply Last reply
    0
    • J jingya_feng

      Hi, The records of the DataSet were loaded from Web Service. I wanna save the records to MS SQL Server table. How can I do? I get a idea: Save the data to xml documents by WriteXml() method, and load the data from xml into SQL Server table. If I do like this , how can I load the xml's records into table? Thanks!

      A Offline
      A Offline
      Alomgir Miah
      wrote on last edited by
      #2

      Are you looking for this using System.Data.SqlClient; public DataTable ReturnDataTbl(string XmlFile) { DataSet dset = new DataSet(); FileStream fstr = new FileStream(XmlFile, FileMode.Open, FileAccess.Read); dset.readXml(fstr); DataTable dtbl = dset.Tables[0]; fstr.Close(); dset.Dispose(); return dtbl; } Live Life King Size Alomgir Miah

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups