Getting error when trying to run Sql Command in SSIS package.
- Task: DataFlow Task
- Connection: ADO.NET
- Data Access mode: Sql Command
Sql text:
select from table where field1 = ? and field2 = ?
Error:" No value given for one or more required parameters"
More Information:
Execute Sql task in package:
(General tab)
- Connection: ADO.NET
- SQL Statement: exec storedprocedureX ?,?
(Parameter Mapping tab)
User::field1 , Input , String , 0 , -1
User::field2, Input, String, 1, -1
Variables set in package
field1
value12C
field2
value15A
What am I missing that is causing the variable values to not be read at Data flow level? I have no problem at the Execute SQL task level.
?
as parameter markers. Change the query to something likeselect from table where field1 = @field1 and field2 = @field2;
and define the parameters with those names. – Dan Guzman