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. C#
  4. typed dataset schema relating to xml file

typed dataset schema relating to xml file

Scheduled Pinned Locked Moved C#
questionxmldatabasevisual-studiohelp
1 Posts 1 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.
  • S Offline
    S Offline
    steve_rm
    wrote on last edited by
    #1

    Hello, VS 2008 I have typed dataset and have added a single data table named dsMissedCalls.xsd and dtMissedCalls. I would like to save some missed calls for my application. The table is very small not more than 10 rows. Example. dtMissedCalls(ID, Caller, DateAndTime) I have created a XML file, and I would like the xml file to have the schema of the typed dataset (dsMissedCalls.xsd). Before when I have been creating xml file. I would add a new xml file. Then click the "Create Schema" button. That would creaet the schema for the xml file. However, as I have created a typed dataset that already has a schema. The question is. How do I get my xml file to relate to that schema? So basically I have created a typed dataSet and would like to save added rows to the xml file. The code below works, but I want to xml to use the dataset schema. Many thanks for help with this confusing question, DataRow row; row = ds.Tables[0].NewRow(); row["Caller"] = callersName; row["DateTime"] = DateTime.Now.ToShortDateString(); ds.Tables[0].Rows.Add(row); ds.WriteXml(missedCallsXML, XmlWriteMode.DiffGram);

    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