![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
G'day all, I'm trying to use an Exec SQL task (SQL Server 2000) to run a stored procedure and assign a message string returned by the proc to a global variable. Here's the code: DECLARE @master_message VARCHAR(5000) SET @master_message = '' EXEC dbo.udp_IP_Update_Master @ov_output_message = @master_message OUTPUT SELECT @master_message AS output_message When I click the Parameters button in the Exec SQL Task properties dialogue, I get a message saying that there are no parameters in the statement. If I comment out the line with the EXEC statement, it then displays the parameters dialogue and will let me map the output parameter 'output_message' to a global variable. The code runs fine in query analyser. Anyone know what the problem could be? thanks peterDavey Austin Health Melbourne |
#3
| |||
| |||
|
|
The design-time validation is too strict. You can workaround by using some dummy SQL and then swap in the real code afterwards via Disconnected Edit (There is a faster way but I forget, I'll look it up later). More of an explanation of this Global Variables and Stored Procedure Parameters (http://www.sqldts.com/default.aspx?234) -- Darren Green http://www.sqldts.com http://www.sqlis.com "peterDavey" <peter.davey (AT) austin (DOT) org.au> wrote in message news:uJB$t0rKFHA.2136 (AT) TK2MSFTNGP14 (DOT) phx.gbl... G'day all, I'm trying to use an Exec SQL task (SQL Server 2000) to run a stored procedure and assign a message string returned by the proc to a global variable. Here's the code: DECLARE @master_message VARCHAR(5000) SET @master_message = '' EXEC dbo.udp_IP_Update_Master @ov_output_message = @master_message OUTPUT SELECT @master_message AS output_message When I click the Parameters button in the Exec SQL Task properties dialogue, I get a message saying that there are no parameters in the statement. If I comment out the line with the EXEC statement, it then displays the parameters dialogue and will let me map the output parameter 'output_message' to a global variable. The code runs fine in query analyser. Anyone know what the problem could be? thanks peterDavey Austin Health Melbourne |
![]() |
| Thread Tools | |
| Display Modes | |
| |