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 relationship

DataSet relationship

Scheduled Pinned Locked Moved ASP.NET
salesquestion
3 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 have a DataSet with two tables with a relationship.

    dataSetNodeData.Relations.Add(new DataRelation("Relationship",
    dataTableTransmittal.Columns["Node ID"],
    dataTableDocuments.Columns["Parent"]));

    This is working, but now the customer have changed the indata so Parent is now a commaseparated string with id numbers so the same document can belong to several Node ID's. Can I make the DataRelation work with a commaseparated string? Or do I have to rewrite my application totaly?

    C 1 Reply Last reply
    0
    • P Phrone

      I have a DataSet with two tables with a relationship.

      dataSetNodeData.Relations.Add(new DataRelation("Relationship",
      dataTableTransmittal.Columns["Node ID"],
      dataTableDocuments.Columns["Parent"]));

      This is working, but now the customer have changed the indata so Parent is now a commaseparated string with id numbers so the same document can belong to several Node ID's. Can I make the DataRelation work with a commaseparated string? Or do I have to rewrite my application totaly?

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

      No, that's not going to work. You need to rethink your architecture. I suspect you need to change your dataTableDocuments to have a record per parent id, even if they are stored as a csv. I'd say don't store them that way in the first place, just add records for each parent relationship.

      Christian Graus Driven to the arms of OSX by Vista.

      P 1 Reply Last reply
      0
      • C Christian Graus

        No, that's not going to work. You need to rethink your architecture. I suspect you need to change your dataTableDocuments to have a record per parent id, even if they are stored as a csv. I'd say don't store them that way in the first place, just add records for each parent relationship.

        Christian Graus Driven to the arms of OSX by Vista.

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

        Yes, that's the way I thought that I hade to go. I can't affect the indata as it is a export (xml) from a CMS system.

        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