dbTalk Databases Forums  

How do you really get OUTPUT parameters to function?

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


Discuss How do you really get OUTPUT parameters to function? in the microsoft.public.sqlserver.dts forum.



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

Default How do you really get OUTPUT parameters to function? - 05-13-2005 , 02:56 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



Reply With Quote
  #2  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: How do you really get OUTPUT parameters to function? - 05-13-2005 , 03:10 PM






Hi Snake,

be careful starting new threats with same problem ;-)

"Snake" <Snake (AT) discussions (DOT) microsoft.com> schrieb im Newsbeitrag
news:8B8026DB-F042-45B8-9BCD-BF6ACCFADAFB (AT) microsoft (DOT) com...
Quote:
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
what is the output when you execute this in QA? Is there some output in the
message page?

Quote:
I tried to spoof the DTS designer with:

select PropertyId as PropertyImportId,
PropertyparcelId as Retstat
from propertyparcel where propertyid = ? and propertyparcelId = ?
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




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.