Passing Array Information via Global Variables

  • Is it possible to pass array information to other tasks in a DTS using global variables?

    Say I have the following code...

    Dim myArray()

    For i=0 to 999

    ReDim Preserve myArray(i)

    myArray(i) = i

    MsgBox i & " " & myArray(i)

    Next

    How can I save this array information for later use by another task within the same DTS, or possibly for use in another DTS package?

    Thanks!!!

  • In a word, No . Global Variables don't hold arrays.

    Thanks

    Phill Carter

    Edited by - phillcart on 02/03/2003 3:55:49 PM

    --------------------
    Colt 45 - the original point and click interface

  • If you need to store that data for later use, put it in a table.

    I know, this does not answer your question, sorry. But Phill already answered.

  • Just a thought...what if you looped through your array, concatenated the values into some type of delimited string, passed the string to your global variable and then on the other end - assuming on the other end you can use vbscript or something like it - used the split string function to convert it back to an array? Kind of convoluted and for large arrays is probably not reasonable, but for small arrays that need to be passed from one activex script task to another it should work fine...

    Just a thought...

    Michael

    Michael Weiss


    Michael Weiss

  • Thanks for the replies!!!

    I agree with Michael -- for small arrays, the split function would work fine, but I'm dealing with a large array, so I guess I'll just save the information in a table and use a recordset to get at the information. Any other ideas would be greatly appreciated.

    Thanks!!!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply