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. Linq to Sql

Linq to Sql

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

    Hi, I have a Stored Procedure in SQL server which returns multiple tables... using IMultipleResults in Linq to SQl is there a way to fetch only one table from the result ....Please help me regarding the same....

    R K 2 Replies Last reply
    0
    • S siva455

      Hi, I have a Stored Procedure in SQL server which returns multiple tables... using IMultipleResults in Linq to SQl is there a way to fetch only one table from the result ....Please help me regarding the same....

      R Offline
      R Offline
      Rob Philpott
      wrote on last edited by
      #2

      Can't you cut down the stored proc to give just the results you want? Otherwise you're making the DB do more work than necessary, bad for performance and scalability.

      Regards, Rob Philpott.

      S 1 Reply Last reply
      0
      • R Rob Philpott

        Can't you cut down the stored proc to give just the results you want? Otherwise you're making the DB do more work than necessary, bad for performance and scalability.

        Regards, Rob Philpott.

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

        Thanks for ur solution....but please let me know whether is it possible to fetch only the desired single result from the SP"s result set...

        1 Reply Last reply
        0
        • S siva455

          Hi, I have a Stored Procedure in SQL server which returns multiple tables... using IMultipleResults in Linq to SQl is there a way to fetch only one table from the result ....Please help me regarding the same....

          K Offline
          K Offline
          killabyte
          wrote on last edited by
          #4

          cant you just use .GetResult<T> where T is the type of result you want?

          S 1 Reply Last reply
          0
          • K killabyte

            cant you just use .GetResult<T> where T is the type of result you want?

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

            ya thats true but that is not giving me the desired result, we need to fetch other results also prior to this(need to follow the sequence of result sets returned from the sp)..if my result is last one in the SP.....

            K 1 Reply Last reply
            0
            • S siva455

              ya thats true but that is not giving me the desired result, we need to fetch other results also prior to this(need to follow the sequence of result sets returned from the sp)..if my result is last one in the SP.....

              K Offline
              K Offline
              killabyte
              wrote on last edited by
              #6

              sounds like you have to seperate your mega SP into smaller SPs to me then, still cant see why this is a prob without some code

              S 1 Reply Last reply
              0
              • K killabyte

                sounds like you have to seperate your mega SP into smaller SPs to me then, still cant see why this is a prob without some code

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

                actually i cannot change my sp ,bcos this is used in many other places of code they fetch particular resultset which i require.... so please let me knoiw is there a way to fetch only the resultset i need from sp using Imultiplerersults..... As this is achievable in classic ado.net using tablemappings where we can fetch the desired resultset from SP. please let me know how this can be achieved in Linq to SQL....

                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