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. Data Table Relation in Dataset

Data Table Relation in Dataset

Scheduled Pinned Locked Moved C#
questionxmlhelp
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.
  • R Offline
    R Offline
    Rijz
    wrote on last edited by
    #1

    I have a dataset with multiple tables in it. This dataset is created by reading an XML which has nested tables which is shown below. <allocate> <cabin cabintypeId="3" cabinType="deluxe" shareFlag="true" OccupancyType="TripleShare" sameGender="true" cabinId="001" Adult="2" Child="0" Infant="0" availablebeds="1"> <occupant firstname="Micheal" lastname="Lauzon" age="adult" gender="male" nationality="UnitedStates" usePackage="yes" roomrate="100" presold="true" /> <occupant firstname="John" lastname="Martin" age="adult" gender="male" nationality="Australia" usePackage="yes" roomrate="100" presold="false" /> </cabin> <cabin cabintypeId="1" cabinType="Standard" shareFlag="true" OccupancyType="single" sameGender="true" cabinId="005" Adult="1" Child="0" Infant="0" availablebeds="0"> <occupant firstname="Jacob" lastname="Dror" age="adult" gender="male" nationality="UnitedStates" usePackage="yes" roomrate="90" presold="false" /> </cabin> </allocate> once it is transferred to a dataset, it is divided into two independent tables "Cabin" and "occupant". With what reference can I read the data and identify it. What I mean is, in the above XML Set, how can I differentiate that for cabintypeId="3" there are two occupants named John and Michael. As well as for cabintypeId="1" occupant firstname="Jacob". As Cabin and Occupants are two different tables. I suppose I need to identify some Key value for the Relation defined internally for the datatables. How can I do this? Please help me out.. If I am not clear, I can Explain it more... Thanks... Rijz

    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