Link to home
Start Free TrialLog in
Avatar of rmtogether
rmtogether

asked on

using variable in SSIS

Hi,

I have a question in "script task" and "script component".

(1). in "scrip task". I need use "Dts" Variables to access variable like below
 string xls_name = (string)Dts.Variables["User::strFileName"].Value;
but in "script component" I need use "this" to access variable like below
this.Variables.strFileName

I don't understand why it need do like this way, and I would like to learn it. could someone teach me about this.

(2) in  "script component", there are different function block like PreExecute(), postExecute(), CreateNewOutputRows()...etc.

Is it possible to make global variable in one block and let other block can access it. Could you please give me a small code example. thank you

thanks in advance
SOLUTION
Avatar of Reza Rad
Reza Rad
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial