how to use procedure in asp.net

Last Reply on Feb 13, 2012 01:54 AM By nedash

Posted on Feb 12, 2012 10:39 PM

hi

i have 2 procedure in my DB

1-

CREATE PROCEDURE SP_GetTableCode    @Key varchar(50) AS BEGIN     SET NOCOUNT ON;
    select T_Code    from tradeTable    where Keyword= @Key    END

 

2-

CREATE PROCEDURE SP_GetDetails  @T_Code int AS BEGIN      SET NOCOUNT ON;
    if @T_Code = 1    begin     select * from HotelTable    end    else
    if @T_Code = 2    begin         select * from tranigtable     endEND


i want use this procedure in my web site and show tables in my page how i can do it?
can you help me it is very important to me
tanx alot

 


Posted on Feb 13, 2012 12:31 AM

Here

http://www.aspforums.net/Threads/167754/search/Replies/3#Replies

I have given you query. You put that query in one stored proc and there is no need to create or call multiple stored procs