Problems with executing SQL task component parameter passing in SSIS

Source: Internet
Author: User
Tags ole ssis

Original: An issue in SSIS that performs SQL task component parameter passing

Symptom: Execute SQL task, pass parameter to subquery, execute error.

Error: failed with error: "Cannot derive parameter information from an SQL statement that uses a sub-select query. Please set the parameter information before preparing the command. ”。 The reasons for the failure may be that the query itself is problematic, the "ResultSet" property is not set correctly, the parameters are not set correctly, or the connection is not established correctly.

Reason:

Using parameters in the OLE DB Connection Manager

If the Execute SQL task uses the OLE DB Connection Manager, the bypassprepare property of the task is available. This property should be set to trueif the Execute SQL task uses an SQL statement with parameters.

When using the OLE DB connection Manager, parameterized subqueries cannot be used because the Execute SQL task cannot get parameter information through the OLE DB provider. However, you can use an expression to concatenate parameter values into a query string and set the Sqlstatementsource property of the task.


Workaround: Set the bypassprepare property to true.

Problems with executing SQL task component parameter passing in SSIS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.