开发者

How to Set Custom Properties of SSIS Components using Script Task

I am using a custom "Connection Manager" that开发者_JAVA百科 talks to a proprietary database. One of the fields in the Custom Properties section of this object is called "DataQuery", where you can define a query that will be executed on the other end.

I want to use the ScriptTask to build a SQL query on the fly using some variables that are passed in, some c# logic, etc.

Problem is while I know how to set a variable in the script task, I am not sure of the syntax (or if its possible) to set a custom property value.

Some, psuedo code would be:

MyConnectionManager.Properties["DataQuery"] = myQueryString;

Thanks in advance!


Do you have more information on the custom connection manager - generally queries are not part of the connection manager itself.

Perhaps you can :

Use the script task to assign the custom query to a variable.

In the properties of the custom connection string expand expressions

Find the "Dataquery" under properties

Under the corresponding expression use the variable you created in the script task

OR

choose the Connectionstring property and build the connections string as an expression using the variable created in the script task

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜