I am currently trying to map the output parameters of a stored procedure to variables in a package. However when I run the package I get the following error
Error: 0xC002F210 at SQL_LoadThresholdVariables, Execute SQL Task: Executing the query "EXEC [dbo].[AssignWorkVariables] ? OUTPUT, ? OUT..." failed with the following error: "Multiple-step OLE DB operation generated errors. Check
each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: SQL_LoadThresholdVariables
My stored procedure definition is as follows:
USE [AutoMatch]
GO
/****** Object: StoredProcedure [dbo].[AssignWorkVariables] Script Date: 3/25/2013 2:50:50 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[AssignWorkVariables]
(
@WT_WEIGHT NUMERIC(3,2) OUTPUT,
@WT_Similarity NUMERIC(3,2) OUTPUT,
@WT_Confidence NUMERIC(3,2) OUTPUT,
@WPerf_WEIGHT NUMERIC(3,2) OUTPUT,
@WPerf_Similarity NUMERIC(3,2) OUTPUT,
@WPerf_Confidence NUMERIC(3,2) OUTPUT
)
AS
SELECT
@WT_WEIGHT = MAX(CASE WHEN [FieldName] = 'Title' AND ParameterSetID = 6 THEN [Weight] END),
@WT_Similarity = MAX(CASE WHEN [FieldName] = 'Title' AND ParameterSetID = 6 THEN [SimilarityThreshold] END) ,
@WT_Confidence= MAX(CASE WHEN [FieldName] = 'Title' AND ParameterSetID = 6 THEN [ConfidenceThreshold] END),
@WPerf_WEIGHT=MAX(CASE WHEN [FieldName] = 'PerformingArtist' AND ParameterSetID = 6 THEN [Weight] END),
@WPerf_Similarity=MAX(CASE WHEN [FieldName] = 'PerformingArtist' AND ParameterSetID = 6 THEN [SimilarityThreshold] END),
@WPerf_Confidence=MAX(CASE WHEN [FieldName] = 'PerformingArtist' AND ParameterSetID = 6 THEN [ConfidenceThreshold] END)
FROM dbo.Thresholds
WHERE (ParameterSetID = 6)
In the sql task I have the ResultSet = None
My sql statement is as follows:
EXEC [dbo].[AssignWorkVariables] ? OUTPUT, ? OUTPUT, ? OUTPUT,? OUTPUT, ? OUTPUT, ? OUTPUT
I have mapped the parameters using variables defined in the package. This is shown below:
![]()
Not sure what I am doing wrong. Any ideas?