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. Web Development
  3. ASP.NET
  4. DataSet problem [modified]

DataSet problem [modified]

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netxmlquestion
4 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.
  • P Offline
    P Offline
    Phrone
    wrote on last edited by
    #1

    I'm working on my first ASP.NET application ever, so this might be an easy problem to solve for you. I'm collection data from different xml files and want to store them in an DataSet. The data will be shown with an repeater. The page will show something like this: (Short version, will be lots of more information) Miami Engineering 1. General Doc one Doc two 2. Feasibilty calculations Doc three Doc four Doc five When I try to add the data to my DataSet the way I was thinking, I get the error "A DataTable named 'Document' already belongs to this DataSet." This is when I try to make a DataSet with this structure: <projects> <project> <projectname> Miame Engineering <projectname> <project> <part> <partname> 1. General </partname> </part> <document> <documentname> Doc one </documentname> </document> <document> <documentname> Doc two </documentname> </document> <part> <partname> 2. Feasibilty calculations </partname> </part> <document> <documentname> Doc three </documentname> </document> <document> <documentname> Doc four </documentname> </document> <document> <documentname> Doc five </documentname> </document> </projects> How will I build my DataSet so I can get the output that I want?

    modified on Monday, November 17, 2008 5:03 PM

    C 1 Reply Last reply
    0
    • P Phrone

      I'm working on my first ASP.NET application ever, so this might be an easy problem to solve for you. I'm collection data from different xml files and want to store them in an DataSet. The data will be shown with an repeater. The page will show something like this: (Short version, will be lots of more information) Miami Engineering 1. General Doc one Doc two 2. Feasibilty calculations Doc three Doc four Doc five When I try to add the data to my DataSet the way I was thinking, I get the error "A DataTable named 'Document' already belongs to this DataSet." This is when I try to make a DataSet with this structure: <projects> <project> <projectname> Miame Engineering <projectname> <project> <part> <partname> 1. General </partname> </part> <document> <documentname> Doc one </documentname> </document> <document> <documentname> Doc two </documentname> </document> <part> <partname> 2. Feasibilty calculations </partname> </part> <document> <documentname> Doc three </documentname> </document> <document> <documentname> Doc four </documentname> </document> <document> <documentname> Doc five </documentname> </document> </projects> How will I build my DataSet so I can get the output that I want?

      modified on Monday, November 17, 2008 5:03 PM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I am not sure why you're using a dataset, but it doesn't look to me like the data you're using is compatible, unless you specify a maximum number of doctors.

      Christian Graus Driven to the arms of OSX by Vista.

      P 1 Reply Last reply
      0
      • C Christian Graus

        I am not sure why you're using a dataset, but it doesn't look to me like the data you're using is compatible, unless you specify a maximum number of doctors.

        Christian Graus Driven to the arms of OSX by Vista.

        P Offline
        P Offline
        Phrone
        wrote on last edited by
        #3

        I'm using a DataSet because I want to be able to add, delete and change data in it. What do you mean with specifying maximum number of documents? Haven't seen that option, so how do I do that?

        C 1 Reply Last reply
        0
        • P Phrone

          I'm using a DataSet because I want to be able to add, delete and change data in it. What do you mean with specifying maximum number of documents? Haven't seen that option, so how do I do that?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Miami Engineering 1. General Doc one Doc two 2. Feasibilty calculations Doc three Doc four Doc five This is a tree, with three levels. You would have to create three tables and define the relationship between them, to reproduce this structure. Not sure if .NET is smart enough to do that by itself.

          Christian Graus Driven to the arms of OSX by Vista.

          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