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. Issue with Imultiple result sets

Issue with Imultiple result sets

Scheduled Pinned Locked Moved C#
csharpsharepointdatabaselinqhelp
6 Posts 4 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.
  • S Offline
    S Offline
    siva455
    wrote on last edited by
    #1

    Hi, suppose my SP returns 8 results sets i want to fetch only the 8th resultset....the issue which im facing with IMultipleResults.GetResult<> is it is not able to give the 8th resultset...and i need to call all the 7 resultsets before i call 8th resultset....and please let me know how to fetch the 8th resultset directly.... As this is possible in classic ado.net using tablemapping to fetch the desired result set ...please let me know how this can be achieved using Linq to Sql..

    L D B 3 Replies Last reply
    0
    • S siva455

      Hi, suppose my SP returns 8 results sets i want to fetch only the 8th resultset....the issue which im facing with IMultipleResults.GetResult<> is it is not able to give the 8th resultset...and i need to call all the 7 resultsets before i call 8th resultset....and please let me know how to fetch the 8th resultset directly.... As this is possible in classic ado.net using tablemapping to fetch the desired result set ...please let me know how this can be achieved using Linq to Sql..

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      siva455 wrote:

      please let me know how this can be achieved using Linq to Sql.

      Maybe by posting in the LINQ forum.

      Unrequited desire is character building. OriginalGriff

      1 Reply Last reply
      0
      • S siva455

        Hi, suppose my SP returns 8 results sets i want to fetch only the 8th resultset....the issue which im facing with IMultipleResults.GetResult<> is it is not able to give the 8th resultset...and i need to call all the 7 resultsets before i call 8th resultset....and please let me know how to fetch the 8th resultset directly.... As this is possible in classic ado.net using tablemapping to fetch the desired result set ...please let me know how this can be achieved using Linq to Sql..

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        I'd recommend rewriting your SP so it only returns the information needed. Since you're returning 8 results set and throwing out 7 of them, you're wasting compute resources on the SQL Server.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        S 1 Reply Last reply
        0
        • D Dave Kreskowiak

          I'd recommend rewriting your SP so it only returns the information needed. Since you're returning 8 results set and throwing out 7 of them, you're wasting compute resources on the SQL Server.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          S Offline
          S Offline
          siva455
          wrote on last edited by
          #4

          Thanks for ur solution...but as my SP used across other places of code where they coonsume some of the resultsets in 8 resultsets.... Please suggest me is there a way to fetch only the particukar resultset from SP...

          D 1 Reply Last reply
          0
          • S siva455

            Thanks for ur solution...but as my SP used across other places of code where they coonsume some of the resultsets in 8 resultsets.... Please suggest me is there a way to fetch only the particukar resultset from SP...

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Then write another SP that only returns the resultset in question. Having a single SP that returns all kinds of data your don't need is very wasteful. Or dont use an SP and just code the SELECT string to return the data required.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            1 Reply Last reply
            0
            • S siva455

              Hi, suppose my SP returns 8 results sets i want to fetch only the 8th resultset....the issue which im facing with IMultipleResults.GetResult<> is it is not able to give the 8th resultset...and i need to call all the 7 resultsets before i call 8th resultset....and please let me know how to fetch the 8th resultset directly.... As this is possible in classic ado.net using tablemapping to fetch the desired result set ...please let me know how this can be achieved using Linq to Sql..

              B Offline
              B Offline
              BobJanova
              wrote on last edited by
              #6

              Repost

              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