![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Dear all, I am writing a SSIS package which own an ActiveX Script Task (Visual Basic Script code incide) but I haven’t idea or any clue about how do I set up global variables. Something like that: Dim strIdioma strIdioma = DTSGlobalVariables("strIdioma").Value … property “Script” allows me paste any snippet of code but then I don’t know how to link my variables before created. On the other hand "Script task" allows only to introduce Visual Basic .Net and then design by Visual Studio. Any comment would be very appreciated. |
#3
| |||
| |||
|
|
I don't know how to read a global variable within an activex script. However, I had no problems using global variables within vb.net. I'll suggest you start using .net for ssis. To call a variable use something like this If Dts.Variables.Contains("my_variable") = True Then Dts.VariableDispenser.LockOneForRead("my_variable" , variables) End If sDest = CStr(variables("my_variable").Value) However you need to pass my_variable as the read variable in the parameters screen on the Script Task. Otherwise it doesn't seem to work. Panos. "Enric" wrote: Dear all, I am writing a SSIS package which own an ActiveX Script Task (Visual Basic Script code incide) but I haven't idea or any clue about how do I set up global variables. Something like that: Dim strIdioma strIdioma = DTSGlobalVariables("strIdioma").Value . property "Script" allows me paste any snippet of code but then I don't know how to link my variables before created. On the other hand "Script task" allows only to introduce Visual Basic .Net and then design by Visual Studio. Any comment would be very appreciated. |
![]() |
| Thread Tools | |
| Display Modes | |
| |