I have a ms sql 2005 SSIS package with an execute SQL task running a stored procedure. Initially the sp had no parms and I got the package working correctly.
I have now changed the sp to accept two parameters
"ALTER PROCEDURE [dbo].[CreatePostingCSV]
@Yearp as char(4),
@Periodp as char(2)
AS
BEGIN..."
I changed the sqlstatement in the "execute SQL task" to [dbo].[CreatePostingCSV] ?,?
I created two parameter mappings
user::year - input - varchar - year - 4
user:period - input - varchar - period - 2
The two variables have package scope and are assigned values
I execute the package with
DTEXEC /FILE "<path>\CreatePostings.dts
x" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI /SET \package.Variables[Year].P
roperties[
Value];200
8 /SET \package.Variables[Period]
.Propertie
s[Value];1
0
The variables have default values set but should get new values from the /SET parms.
I get the error below
Error: 2008-01-16 11:02:13.11
Code: 0xC002F210
Source: Create Posting lines Execute SQL Task
Description: Executing the query "[dbo].[CreatePostingCSV] ?,?" failed with the following error: "Synt
ax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultS
et" property not set correctly, parameters not set correctly, or connection not established correctly.
End Error
Presumably it is the "parameters not set correctly" but I can't see what is wrong.
Any ideas?
TIA
Start Free Trial