I am converting converting DTS packages to SSIS. In DTS we use a procedure to return pertinent information to a package by using a stored procedure to set package variables. I have hit a wall in that I cannot get this to work. I have searched all over trying to find the information to get this to work. Here is what I have:Create Table TableWithVariables ( PackageID int Identity, DTSPackageName varchar(50), SourceSystem varchar(50), SouceTable varchar(50), Constraint PK_TableWithVariables Primary Key NonClustered ( PackageID ASC ))Insert TableWithVariables (DTSPackageName,SourceSystem,SouceTable)Select 'Package1', 'Source1', 'Table1' union allSelect 'Package2', 'Source2', 'Table2' union allSelect 'Package3', 'Source3', 'Table3' union allSelect 'Package4', 'Source4', 'Table4'CREATE PROCEDURE dbo.upGetDTSPackageVariables @Package varchar(80), @PackageName varchar(250) OUTPUT, @SourceSystem varchar(250) OUTPUT, @SourceTable varchar(250) OUTPUT, @CurrentDate datetime OUTPUT AS SET NOCOUNT ON SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED Select @PackageName = PackageName, @SourceSystem = SourceSystem, @SourceTable = SouceTable, @CurrentDate = getdate() From DTSPackageVariables Where PackageName = @Package RETURNGO
I have been using Exec upGetDTSPackageVariables2 ?, ? Output, ? Output, ? Output, ? Output
Under the general tab, I have:ResultSet - noneConnectionType - OLE DBConnection - "ConnectionName"SQLSourceType - Direct InputSQL Statement - Exec upGetDTSPackageVariables2 ?, ? Output, ? Output, ? Output, ? OutputI have the parameter mapping set with the following:[code]User::DTSPackge (String) | Input | Varchar | 0User::Packagename (String) | Output | Varchar | 1User::SourceSystem (String) | Output | Varchar | 2User::SourceTable (String) | Output | Varchar | 3User::CurrentDate (DateTime) | Output | Date | 4[/Code]I need to return the values of upGetDTSPackageVariables to variables in the SSIS package. It is not working. I keep getting the error, "Error HRESULT E_FAIL has been returned from a call to a COM component." What am I doing wrong?-JonShould still be a "Starting Member" .