简体   繁体   中英

Variable in Data flow task in SSIS

I have developed SSIS package where in I have script component and Data flow task. Script component take 2 input variables namely Db2Con, SQLCon which are DB2 connection string and SQL Connection String. In this script component, I am dynamically generating Query and saving its value to the output variable namely DB2Qry. Now, In Data flow task, I am using this variable for source component.But it is not allowing me to do so with an Error "SSIS Error Code DTS_E_OLEDBERROR". In script component, I have made this variable as 'ReadWrite Variable.' Please suggest if I am missing something.

SQL's EvaluateAsExpression should be set to FALSE. You're not putting an expression into the variable, As you're assigning a static value through your script.

and you need to manually set a "default" value for your SQL variable in the Variables pane, otherwise the OLE DB Source has nothing to use for the SQL statement at design time

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM