Monday, March 29, 2010

SSIS 2005: Script consuming variable value

Trough my SSIS incursions I have discovered an interesting 'bug'. I'm calling this a 'bug' since I have not seen any postings about this.

I was using a script to clean a variable with a string value and so far so good.

1) passing the variable to the Script Task Editor's "ReadWriteVariables"
2) scripting:
(..)
Dts.Variables("ErrorMessage").Value = ""
(..)

Then I decided I did not want to clean it's value any more so I commented the script.

(..)
' Dts.Variables("ErrorMessage").Value = ""
(..)


The value kept on being cleaned so I deleted the commentary line.cThe value kept on being cleaned.

The next step was to remove the variable from the Script Task Editor's ReadWriteVariables... them the variable stopped being cleaned.

Hope that if someone stumbles upon this one, this post may help out. I just lost a few minutes around this one.

Complements,

1 comment:

Rute said...

Aloha!! :)
Então tens um blogue e não avisas os amigos?? :p

Ainda por cima um blogue escrito em chines! ihihhi.

Joquinhas!