SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS Accessing the properties of another Component from within a Script Component


SSIS Accessing the properties of another Component from within a Script Component

Author
Message
Damien-909126
Damien-909126
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 21
Hi Guys,

I have been trying to find out how to access the properties of one component from within a script task. Below is more exact scenario:

I have a DataReaderSource that executes a query that is actually generated on the fly by an expression. I would like to be able to take that SQL Statement and read it using a script component that is within the same Data Flow.

If I look at the Data Flow Task Properties it is stored as [GET Total Costs].[SqlCommand]

So my question is do I reference this value from within my script component? I sure it something that can be done, I can't find any references to it.

Any help would be very much appreciated!

Thanks,
Damien
CozyRoc
CozyRoc
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2366 Visits: 2235
Damien (1/21/2009)
Hi Guys,

I have been trying to find out how to access the properties of one component from within a script task. Below is more exact scenario:

I have a DataReaderSource that executes a query that is actually generated on the fly by an expression. I would like to be able to take that SQL Statement and read it using a script component that is within the same Data Flow.

If I look at the Data Flow Task Properties it is stored as [GET Total Costs].[SqlCommand]

So my question is do I reference this value from within my script component? I sure it something that can be done, I can't find any references to it.

Any help would be very much appreciated!

Thanks,
Damien


Damien,

You have to setup your [GET Total Costs].[SqlCommand] with "Expression". The expression should be based on package variable. You can then use this variable in your script component.

---
SSIS Tasks Components Scripts Services | http://www.cozyroc.com/


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search