
Calling ActiveX component with array parameter
hi Don,
I think you are out of luck on this one. As you know, VBScript variables
are "variants", and of course you can store an array of strings in a variant
array.
Howeve, when you pass the (variant) array of strings, I think your component
is going to throw up, (because things are not going to be in the right
places).
If you have just one string (not an array), and want to pass it to a
component, then you can "type-convert" the string, using
CStr(myVariantString), and the string will get passed properly. But,
(afaik), you can't type-convert an array...
If you have access to the component source, your best bet is to declare your
string array as a variant array in your conponent, and then just access the
strings the same way as you would in vbscript.
cheers, jw
Quote:
> I have a ActiveX component with a method that takes an array of Strings as
> one of its parameters. The component was written in VB. When I try to call
> this method from ASP I get a Subscript out of range error. How do I pass
an
> the array to a VB component. Code looks something like this.
> Dim myArray(1)
> myArray(0) = "One"
> myArray(1) = "Two"
> myVal = component.buildList(Cstr(P1), CLng(P2), myArray)
> Thanks in advance.
> --
> Don Miller
> Integic Corporation