By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,225 Members | 2,170 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,225 IT Pros & Developers. It's quick & easy.

Output from Extended Stored Procedure

P: n/a
Hi all

Ive got a problem I was hoping someone may be able to help with.

Im calling an extended stored procedure provided by a third party
(master..xp_OrderHeader).
This xp requires 3 inputs and is supposed to provie one output.

When I call it in SQL Query Analyser all runs OK and I get a column result
(single result) titled "Output_Info" with a value of say 300051

Here is an example call
execute master..xp_OrderHeader @CustID, @TodayDate, @OrderID,
@Output_Info OUTPUT

I would have thought that my variable @Output_Info would hold the output,
but all I get is NULL?

Any ideas what Im doing wrong. Seems bizarre that the XP Ive been provided
is displaying a result (be it a coumn I haven't named) ... but I can get it
into my variable for use.

Cheers

Craig
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Craig Hoskin" <no****@infobahn.co.nz> wrote in message news:<Od********************@news.xtra.co.nz>...
Hi all

Ive got a problem I was hoping someone may be able to help with.

Im calling an extended stored procedure provided by a third party
(master..xp_OrderHeader).
This xp requires 3 inputs and is supposed to provie one output.

When I call it in SQL Query Analyser all runs OK and I get a column result
(single result) titled "Output_Info" with a value of say 300051

Here is an example call
execute master..xp_OrderHeader @CustID, @TodayDate, @OrderID,
@Output_Info OUTPUT

I would have thought that my variable @Output_Info would hold the output,
but all I get is NULL?

Any ideas what Im doing wrong. Seems bizarre that the XP Ive been provided
is displaying a result (be it a coumn I haven't named) ... but I can get it
into my variable for use.

Cheers

Craig


I don't know much about extended SPs, but I guess that it has simply
not been written to support an output parameter. The easiest solution
is probably to use a temp table:

create table #t (Output_Info int)
insert into #t exec master..xp_OrderHeader (...)
select @Output_Info = Output_Info from #t

Simon
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.