![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I've seen lots of posts (and solutions) with people trying to save recordsets to a global variable. However, I seem to be the only one trying something that would be as common and more simple in my opinion, creating an explicit global variable of type array. Basically, I'm parsing a file to get the names of DTS pkgs to run and placing the list into an array of strings to be processed by subsequent tasks. I want the variable defined EXPLICITLY so I can easily access it in the scripting window. I can run the step that populates the variable and save the package as long as I don't try to explicitly define the global in the package properties. If I try to define it on the global variables tab (as a string OR <other>), then running the step works, but the package won't save. Looking in the global variables tab shows the type has been changed to BLANK. A simple test case follows, if TestArray is explicityl defined as ANY type and the step is run, the package can't be saved! This is a show stopper for long term maintenance of packages. Function Main() 'Create test array and place in explicit global dim strTest(2) strTest(0) = "One" strTest(1) = "Two" msgbox strTest(0) & " and " & strTest(1) DTSGlobalVariables("TestArray").Value = strTest Main = DTSTaskExecResult_Success End Function |
![]() |
| Thread Tools | |
| Display Modes | |
| |