Click here to Skip to main content
15,906,645 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i get multiple record sets from single stored procedure to linq and how can i access results
Posted

1 solution

You can do it using IMultipleResults.

Here is the Link[^]. This might help you
 
Share this answer
 
Comments
LakshmiNarayana Nalluri 25-Apr-11 2:10am    
My requirement is to get results from the below stored procedure.


set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER procedure [dbo].[getstudent]
(@result int)
as
begin
if(@result=1)
SELECT count(*) as totalrecords
from student
-- second recordset – the book list
else if(@result=2)

select sno,sname,address
from student
end

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900