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. General Programming
  3. XML / XSL
  4. DataSet to XML & from XML to Databse

DataSet to XML & from XML to Databse

Scheduled Pinned Locked Moved XML / XSL
csharpdatabasexmlhelpquestion
3 Posts 3 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.
  • L Offline
    L Offline
    LAYEEQ AHMED KHAN
    wrote on last edited by
    #1

    Hi friends, iam new to .Net Technology,i want some help reg--the task is that ,how can i save the data to XML file and from there to Database and vice versa Thanx

    L realJSOPR 2 Replies Last reply
    0
    • L LAYEEQ AHMED KHAN

      Hi friends, iam new to .Net Technology,i want some help reg--the task is that ,how can i save the data to XML file and from there to Database and vice versa Thanx

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Try looking at the Database articles here on CodeProject Also there is probably an example of doing exactly that as part of the MSDN documentation. You can probably find it searching with Google and putting MSDN as the first key word in your search phrase.

      led mike

      1 Reply Last reply
      0
      • L LAYEEQ AHMED KHAN

        Hi friends, iam new to .Net Technology,i want some help reg--the task is that ,how can i save the data to XML file and from there to Database and vice versa Thanx

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        You can try this:

        DataSet ds = GetMyDataset(); // imaginary function - substitute your dataset retrieval code here
        XmlTextWriter xmlFile = new XmlTextWriter (@"C:\TEST.XML", null);
        XmlDataDocument xmlDoc = new XmlDataDocument(ds);
        xmlDoc.WriteContentTo(xmlFile);
        xmlFile.Close();

        The code above should take a dataset and write it to a XML file.

        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

        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