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. Database & SysAdmin
  3. Database
  4. DataSet - Query problem

DataSet - Query problem

Scheduled Pinned Locked Moved Database
questiondatabasehelp
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.
  • T Offline
    T Offline
    Timothy_1982
    wrote on last edited by
    #1

    i would like to know how that i can do something like this: this is my query: select a.col2, a.col3, b.col2 from tableA a INNER JOIN tableB On a.col1 = b.col1 now if i use a fill from a data adapter i get a dataset with one table with my results. what i want is a dataset: with 2 tables one with the nfo from table a, and one with the info from table b how can i do this? or isn't this possible?

    D 1 Reply Last reply
    0
    • T Timothy_1982

      i would like to know how that i can do something like this: this is my query: select a.col2, a.col3, b.col2 from tableA a INNER JOIN tableB On a.col1 = b.col1 now if i use a fill from a data adapter i get a dataset with one table with my results. what i want is a dataset: with 2 tables one with the nfo from table a, and one with the info from table b how can i do this? or isn't this possible?

      D Offline
      D Offline
      Daniel Santillanes
      wrote on last edited by
      #2

      Yes, query tablea, and fill a 'tableA' in a dataset, and then query tableb, and fill a 'tableB' in the dataset, you can have a preset dataset with the relationship or generate it in code. daniero

      T 1 Reply Last reply
      0
      • D Daniel Santillanes

        Yes, query tablea, and fill a 'tableA' in a dataset, and then query tableb, and fill a 'tableB' in the dataset, you can have a preset dataset with the relationship or generate it in code. daniero

        T Offline
        T Offline
        Timothy_1982
        wrote on last edited by
        #3

        how do you mean a preset dataset with relationship? the thing i want to avoid is: query table a and fill it in the dataset, than query table b and fill the same dataset, and then put the relationships on it. I want to do this with one query to the db, is this possible? to execute your query, so your adapter will fill your dataset with different tables and relationships.

        D 1 Reply Last reply
        0
        • T Timothy_1982

          how do you mean a preset dataset with relationship? the thing i want to avoid is: query table a and fill it in the dataset, than query table b and fill the same dataset, and then put the relationships on it. I want to do this with one query to the db, is this possible? to execute your query, so your adapter will fill your dataset with different tables and relationships.

          D Offline
          D Offline
          Daniel Santillanes
          wrote on last edited by
          #4

          Unless someone else has a better Idea, that's the way I would do it. By preset I mean an xsd file representing a dataset (I think it's called typed dataset). I don't think you can have 2 tables out of one query, unless you make the query as you did, and manually adding the rows in the datatables... but that's even worse :P. daniero -- modified at 18:21 Tuesday 15th November, 2005

          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