all groups > sql server dts > may 2005 >
You're in the

sql server dts

group:

How do you really get OUTPUT parameters to function?


Re: How do you really get OUTPUT parameters to function? Helge C. Rutz
5/13/2005 12:00:00 AM
sql server dts:
Hi Snake,

be careful starting new threats with same problem ;-)

"Snake" <Snake@discussions.microsoft.com> schrieb im Newsbeitrag
news:8B8026DB-F042-45B8-9BCD-BF6ACCFADAFB@microsoft.com...
[quoted text, click to view]

what is the output when you execute this in QA? Is there some output in the
message page?

[quoted text, click to view]
Looks nearly OK for me.
Names are not important, only the order - do you have the right order for
input and output?
Output could be permuted!

And what is the result of this step?
Which values are stored in the both variables?

Helge

How do you really get OUTPUT parameters to function? Snake
5/13/2005 12:56:01 PM
Yes, yes I have read the article on SQLDTS regarding output parameters in
Execute SQL Task. Well, it aint so easy!! Since there is no visibility into
the processes involved, I can not debug it. Here is what I am trying to do:
Execute a proc with two input parameters, and return the ReturnStatus and
PropertyImportId. Should be really, really simple.

DECLARE @Retstat int, @PropertyImportId int
EXEC @Retstat = dbo.DeedsImport ?, ?, @PropertyImportId output
SELECT @Retstat as Retstat, @PropertyImportId as PropertyImportId
I tried to spoof the DTS designer with:

select PropertyId as PropertyImportId,
PropertyparcelId as Retstat
from propertyparcel where propertyid = ? and propertyparcelId = ?

Here is the Proc defn:
CREATE PROCEDURE DeedsImport @@VendorId int = 1,
@@FileName Varchar(50),
@@PropertyImportId int
OUTPUT
AS


Here is the table reference:
CREATE TABLE [PropertyParcel] (
[PropertyParcelID] [int] IDENTITY (1, 1) NOT NULL ,
[CreationDate] [smalldatetime] NOT NULL CONSTRAINT
[DF_PropertyParcel_CreationDate] DEFAULT (getdate()),
[LastUpdated] [smalldatetime] NOT NULL CONSTRAINT
[DF_PropertyParcel_LastUpdated] DEFAULT (getdate()),
[PropertyID] [int] NOT NULL ,
[ParcelNumber] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
CONSTRAINT GO

AddThis Social Bookmark Button