SSIS Exec SQL Task Output Parm Value Not Updating Package Variable
- From: GrandeApps <grande@xxxxxxxxxxxxxxxx>
- Date: Mon, 22 Jan 2007 08:51:01 -0800
I hope that someone can help me with my output parameter problem, as it has
been very frustrating so far. First some background:
I've created a Master Package that will be used as a template for developing
new SSIS packages. The package starts by logging some audit information into
a SQL table. At the end of the process, the created audit record will be
updated with a completion datetime stamp and a successful processing
indicator field.
I added a Sequence Container to the Control Flow tab. Inside this
container, I added an Execute SQL task. To create the audit record, I wrote
a stored procedure that accepts audit information via input parameters and
returns the identity key value back as an output parameter. I ran the stored
procedure in Management Studio and the stored procedure executes as intended,
returning the key of the new record.
In the Execute SQL Task Editor, I updated the General tab as follows:
1. Set the ConnectionType to ADO.NET
2. Set the Connection to my Audit Database connection, defined in Connection
Manager
3. Set the SQLStatement field to dbo.usp_APP_PackageAudit_Start
NOTE: This is the name of the stored procedure I'm using
4. Set the IsQueryStoredProcedure to True
In the Execute SQL Task Editor, I updated the Parameter Mapping tab as
follows:
1. Mapped variables, both User and System type, to the stored procedure
input parameters.
2. Mapped a Package Level user variable called "PackageExecKey" with the
following values
Direction: Output
DataType: Int32
Parameter Name: @parPackageExecKey
NOTE: This is the name of the stored procedures OUTPUT parameter, where the
key value is returned
When I run the package, the audit record is created and populated with all
of the correct information. However, my user variable "PackageExecKey" is
never updated with the key of the new record, via the output parameter. This
causes a problem when the package finishes, since I cannot update the audit
record with the completion datetime stamp and the successful processing
indicator.
If anyone can shed some light on this issue, please do! I know that there
may be some other connection types (e.g. OLEDB), but would prefer to stay
with the ADO.NET connection, since it uses the parameter names instead of the
? and ordinal position numbers. I find using the parameter names more
intuitive. If, however, that is the only way this will work I will be forced
to go that route.
Thanks for your help!
--
Grande Applications
.
- Follow-Ups:
- RE: SSIS Exec SQL Task Output Parm Value Not Updating Package Variable
- From: GrandeApps
- Re: SSIS Exec SQL Task Output Parm Value Not Updating Package Variable
- From: Allan Mitchell
- RE: SSIS Exec SQL Task Output Parm Value Not Updating Package Variable
- Prev by Date: Match your Design site's data schema and SQL statement to Application site
- Next by Date: Re: Change DTS package GUID
- Previous by thread: Match your Design site's data schema and SQL statement to Application site
- Next by thread: Re: SSIS Exec SQL Task Output Parm Value Not Updating Package Variable
- Index(es):
Relevant Pages
|