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. Maniupulating information from a dataset to save it into an array ???? [modified]

Maniupulating information from a dataset to save it into an array ???? [modified]

Scheduled Pinned Locked Moved ASP.NET
data-structureshelptutorialquestion
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
    lued
    wrote on last edited by
    #1

    Hello to everybody, i hope you can help me, I have a dataset which contains datas from a table..this table has 2 fields (id and data) both are string, well i want to do this: i need to get all the datas from every id and save them into an array, i need this for every id... Note: the id may be repeated according to the number of datas that contains that id.....for example: ........................................................................... This is what my dataset contains

    ID DATA


    04231050 368 ...here you can see that the id is repeated
    04231050 234 ...
    04333333 445 ......other id repeated
    04333333 557 ......
    04235789 786

    ........................................................................... But I want it like this:

    ID DATA DATA


    04231050 368 234
    04333333 445 557
    04235789 786

    modified on Monday, April 6, 2009 2:10 PM

    J A 2 Replies Last reply
    0
    • L lued

      Hello to everybody, i hope you can help me, I have a dataset which contains datas from a table..this table has 2 fields (id and data) both are string, well i want to do this: i need to get all the datas from every id and save them into an array, i need this for every id... Note: the id may be repeated according to the number of datas that contains that id.....for example: ........................................................................... This is what my dataset contains

      ID DATA


      04231050 368 ...here you can see that the id is repeated
      04231050 234 ...
      04333333 445 ......other id repeated
      04333333 557 ......
      04235789 786

      ........................................................................... But I want it like this:

      ID DATA DATA


      04231050 368 234
      04333333 445 557
      04235789 786

      modified on Monday, April 6, 2009 2:10 PM

      J Offline
      J Offline
      Jorgen Andersson
      wrote on last edited by
      #2

      Not really related to Asp.Net. I recommend you to repost your question in the appropriate forum to enhance the chance to get a proper answer. But until then you can read up on Jagged Arrays here[^] or here[^] depending on your lingual taste.

      "Lots of programmers have had sex - some have even had it with members of the same species." - Pete O'Hanlon

      1 Reply Last reply
      0
      • L lued

        Hello to everybody, i hope you can help me, I have a dataset which contains datas from a table..this table has 2 fields (id and data) both are string, well i want to do this: i need to get all the datas from every id and save them into an array, i need this for every id... Note: the id may be repeated according to the number of datas that contains that id.....for example: ........................................................................... This is what my dataset contains

        ID DATA


        04231050 368 ...here you can see that the id is repeated
        04231050 234 ...
        04333333 445 ......other id repeated
        04333333 557 ......
        04235789 786

        ........................................................................... But I want it like this:

        ID DATA DATA


        04231050 368 234
        04333333 445 557
        04235789 786

        modified on Monday, April 6, 2009 2:10 PM

        A Offline
        A Offline
        a hamidy
        wrote on last edited by
        #3

        put your dataset Table in to dataview and then convert it back to table with distinct values and then covert datatable to array as follow C# [code] DataView dv=new DataView(ds.Tables["tblName"]); DataTable temp=dv.ToTable(true,"col1","col2"); [/code] now convert temp to array

        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