Re: Output Parameter To Global Variable (DTS)
From: Darren Green (darren.green_at_reply-to-newsgroup-sqldts.com)
Date: 10/16/04
- Previous message: land: "about msdtc"
- In reply to: Paul Timmerman: "Re: Output Parameter To Global Variable (DTS)"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 16 Oct 2004 18:56:42 +0100
In message <9A2E6860-3F67-4FA3-A74D-4F7B1FEC0089@microsoft.com>, Paul
Timmerman <PaulTimmerman@discussions.microsoft.com> writes
>I thought I had the parameters mapped properly. I have read the mentioned
>article and used the dummy code.
>
>When I run
>
>DECLARE @OutputTest1 int, @OutputTest2 int
>EXEC dbo.spInputAndOutputTest ?, ?, @OutputTest1 OUTPUT, @OutputTest2 OUTPUT
>SELECT @OutputTest1 AS OutputTest1, @OutputTest2 AS OutputTest2
>
>in QA, the ouput variables return as NULL. I think that is normal.
>
If you run this in QA I would expect an error because you still have the
? place holders in there. If you supply real values instead then you
should get decent output values as well, as per the simple calculation
in the procedure.
>I can get around this whole problem by simply SELECTING the values at the
>end of the stored procedure thereby having the SP return a result set. This
>of course nullifies the need for the OUTPUT parameters. I would however like
>to get them to work. Whatever I do I seem to get NULL valeus for the output
>parameters.
>
Sorry, I am at a loss, as the sample code I posted previously works fine
for me. Only thing I can think of is that since the output values are
derived from the input, make sure the input is not null for the sample
proc, or you could even hard code the output values, although this no
longer tests that the input is received correctly.
-- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org
- Previous message: land: "about msdtc"
- In reply to: Paul Timmerman: "Re: Output Parameter To Global Variable (DTS)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|