Join tables in a dataset

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Ross
    New Member
    • Jan 2007
    • 119

    Join tables in a dataset

    Is there a way to to create a single table from multiple tables in a dataset?

    I currently have a dataset with multiple tables and and relations connecting those tables.
    Table1 has many records to each record in Table2. I would like to create a new table which is effectively Table2 INNER JOIN Table1.
    Is there an easy way to achieve this?

    Or am I just going to have to manually create a new datatable and cycle through each record in Table 2 using GetParentRow to grab values from Table1 and manually build each row to populate it with?


    I am using VB.Net (.Net version 2) to create a web application.
  • shweta123
    Recognized Expert Contributor
    • Nov 2006
    • 692

    #2
    Hi,

    Please refer this Article

    Originally posted by Bob Ross
    Is there a way to to create a single table from multiple tables in a dataset?

    I currently have a dataset with multiple tables and and relations connecting those tables.
    Table1 has many records to each record in Table2. I would like to create a new table which is effectively Table2 INNER JOIN Table1.
    Is there an easy way to achieve this?

    Or am I just going to have to manually create a new datatable and cycle through each record in Table 2 using GetParentRow to grab values from Table1 and manually build each row to populate it with?


    I am using VB.Net (.Net version 2) to create a web application.

    Comment

    • Bob Ross
      New Member
      • Jan 2007
      • 119

      #3
      Originally posted by shweta123
      Hi,

      Please refer this Article
      This link doesn't work for me.

      Comment

      • Bob Ross
        New Member
        • Jan 2007
        • 119

        #4
        I have managed to get access to the page using a proxy website. No idea why i can't get through to it. Oh well.

        Thanks very much Shweta. Thats does exactly what I want.

        Just out of interest In the article it uses this syntax -
        DatasetName.Tab les!TableName

        I have never come across this syntax before. I would always use
        DatasetName.Tab les("TableName" )

        What is the difference between the two? Where can you use the ! (exclamation mark)?

        Sorry but I can't find any info through google on the syntax.

        Comment

        • shweta123
          Recognized Expert Contributor
          • Nov 2006
          • 692

          #5
          Hi,

          One can use both the syntax to access the tablename property.


          Originally posted by Bob Ross
          I have managed to get access to the page using a proxy website. No idea why i can't get through to it. Oh well.

          Thanks very much Shweta. Thats does exactly what I want.

          Just out of interest In the article it uses this syntax -
          DatasetName.Tab les!TableName

          I have never come across this syntax before. I would always use
          DatasetName.Tab les("TableName" )

          What is the difference between the two? Where can you use the ! (exclamation mark)?

          Sorry but I can't find any info through google on the syntax.

          Comment

          • Bob Ross
            New Member
            • Jan 2007
            • 119

            #6
            Okay thanks but I was looking for a little more detail than that. I managed to work that much out on my own.

            I want to know - where else it can be used? What is the advantages/disadvantages? Where can I find more information on it?

            Comment

            Working...