baskaran chellasamy

baskaran chellasamy

  • NA
  • 114
  • 151.2k

How to call and return join qurey results uisng stored procedure in c# application

Aug 15 2012 10:29 AM
Hi friends,
        this is my stored procedure for join query

alter procedure sp_gridtofind(@studid int)
as
declare @sectid int
set nocount on
begin
select @sectid=Section_id from Student_Acadamic_details where Student_id=@studid
select St.Standered_name,sd.Section_name,ad.Acadamic_year_from,ad.Acadamic_year_to from Standered_details st inner join Section_details sd on st.Standered_id=sd.Standered_id inner join Acadamic_year ad on ad.Acadamic_year_id =sd. Acadamic_year_id  where sd.Section_id=@sectid
end
 
I got the desirable results from this stored procedure. but i want to return this in datatable in c# application.if we return seprate table value mean we can return with that appropriate table name using dataset and datatable.but here three table values need to be return.i dont know how can return this in datatable.
Please help me



Answers (2)