Retrieving output params from stored procedure?

  • Thread starter Thread starter Djimbo
  • Start date Start date
D

Djimbo

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?
 
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)
 
Back
Top