Forum Discussion

stephenjansen's avatar
stephenjansen
New Contributor
13 years ago

Passing an array of string as a parameter to a function (VB Script)

What is the best/most effective/best practice for passing an array of string (array variable) to a function hosted in a seperate script?




Currently the calling sub-routine reads data from an MS SQL R2 DB, and populates an array with the values found in the 20 (VChar) fields in the table. I am not managing to pass that array on to the called function in another script.
  • Hi



    if ur array is say 'abc' then pass it to ur function as



    fun1 abc



    and in called function get it as ref



    function fun1(byref abc)

     ...........

    end function



    use value of abc as such and check it out does it helps u.
  • Hi Anand. Thanks for your response, even though I had managed to resolve the dilemma

    in the interim. Your response proved useful as a source of reliable reference

    that I used to perform a QC on my own solution. Because that's our game;

    ensuring quality where we are involved :-)



    Thanks again, Stephen