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. General Programming
  3. C#
  4. multiple select

multiple select

Scheduled Pinned Locked Moved C#
csharpdatabasequestion
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.
  • F Offline
    F Offline
    fmardani
    wrote on last edited by
    #1

    Using .net 2.0 Is it possible to have a stored procedure with several select statements so that a dataset can be populated with all of the select statements. So the dataset will end up with several tables (One table for one select statement). At present I use the dataadapter to fill the dataset. I do this for each stored procedure which holds a select statement each. But rather than repeating this method several times (One for each select), I would like to do all this in one stored procedure and populate a dataset with the results of these tables. Is this to do with MultipleResultSet (MRS)? Any suggestions please? Thanks

    Mircea PuiuM P 2 Replies Last reply
    0
    • F fmardani

      Using .net 2.0 Is it possible to have a stored procedure with several select statements so that a dataset can be populated with all of the select statements. So the dataset will end up with several tables (One table for one select statement). At present I use the dataadapter to fill the dataset. I do this for each stored procedure which holds a select statement each. But rather than repeating this method several times (One for each select), I would like to do all this in one stored procedure and populate a dataset with the results of these tables. Is this to do with MultipleResultSet (MRS)? Any suggestions please? Thanks

      Mircea PuiuM Offline
      Mircea PuiuM Offline
      Mircea Puiu
      wrote on last edited by
      #2

      See here.[^]

      SkyWalker

      1 Reply Last reply
      0
      • F fmardani

        Using .net 2.0 Is it possible to have a stored procedure with several select statements so that a dataset can be populated with all of the select statements. So the dataset will end up with several tables (One table for one select statement). At present I use the dataadapter to fill the dataset. I do this for each stored procedure which holds a select statement each. But rather than repeating this method several times (One for each select), I would like to do all this in one stored procedure and populate a dataset with the results of these tables. Is this to do with MultipleResultSet (MRS)? Any suggestions please? Thanks

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

        Shouldn't that work? Rather than a stored procedure simply have several selects in one statement? CommandText="select blah blah blah ; select something else" ; (With SQL server anyway, not all engines support it.)

        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