PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Retrieving output params from stored procedure?

Reply

Retrieving output params from stored procedure?

 
Thread Tools Rate Thread
Old 21-06-2006, 11:33 PM   #1
Djimbo
Guest
 
Posts: n/a
Default Retrieving output params from stored procedure?


Hi,

for example on the follow procedure:

create procedure myproced
@id int
as begin
select name,country from mytable where id=@id
end


i want to retrieve the output parameters from a stored procedure using
sqlserver,
the DeriveParameters only returns me the input param "@id", but i need
the output params "name" and "country"

any one can help me?

  Reply With Quote
Old 22-06-2006, 09:49 AM   #2
Sharmila
Guest
 
Posts: n/a
Default Re: Retrieving output params from stored procedure?

Hi,

You can specify the output paramater using keyword "output" in stored
procedure. Given an example which outputs the name of the author


Create procedure AuthList
@id int,
@name varchar(20) output
as
begin
select @name=au_lname from authors where au_id=@id
print @name
end

Thanks
Sharmila
(www.syncfusion.com)

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off