I have an Execute SQL Task object in the Error handlers section of a SSIS package. What it does is inserting a record to a table using OLE DB connection. There is a value in the insert statement that should be sourced from a user variable.
When I try to pass the query I get the following error, I searched internet a lot and tried different things, but still get the error message:
"The query failed to parse. Parameter Information cannot be derived from SQL Statements. Set parameter information before preparing command."
What I have set to the SQLStatement is:
INSERT INTO ErrorLog(ErrorDateTime, ErrorDescription) VALUES(GETDATE(),?)
What I have in the Parameter Mapping section of the Task:
The SQLSourceType is "Direct input" and as there is no result to this query the ResultSet has been set to "None".
The ErrorDescription column in the target table is varchar(max).
Any idea how fix this issue?
Thanks in advance.