dbTalk Databases Forums  

ExecSQL not returning output parameter to global var

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss ExecSQL not returning output parameter to global var in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy
 
Posts: n/a

Default ExecSQL not returning output parameter to global var - 08-23-2005 , 02:48 PM






I have an execute SQL task that is running a stored proc that returns either
a 1 or a 0.......which I have declared as a char. Here is the code I have in
my execute SQL task.

declare @Result char(1)
exec usp_CheckFreeSpace @Result OUTPUT, ?
select @Result as StagingSpaceResult

I have the output parameter set up as a Row Value and point it to a global
variable which is a string, and it is not populating the variable. When I
run the stored proc in Query Analyzer it works fine. Any suggestions are
appreciated.

Thanks

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: ExecSQL not returning output parameter to global var - 08-23-2005 , 05:06 PM






Have you had a look at this article?

Global Variables and Stored Procedure Parameters
(http://www.sqldts.com/default.aspx?234)


"Andy" <Andy (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have an execute SQL task that is running a stored proc that returns
either
a 1 or a 0.......which I have declared as a char. Here is the code I have
in
my execute SQL task.

declare @Result char(1)
exec usp_CheckFreeSpace @Result OUTPUT, ?
select @Result as StagingSpaceResult

I have the output parameter set up as a Row Value and point it to a global
variable which is a string, and it is not populating the variable. When I
run the stored proc in Query Analyzer it works fine. Any suggestions are
appreciated.

Thanks



Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.