
call to COM object returns empty variant array???
The call works fine when I call it from ASP (server side), or when called
from a VB application. It returns everything as expected. It is only
failing when being called from vbScript (client side). It is being
instantiated through an RDS dataspace. Is there some problem with passing
variant arrays ByRef from vbScript and having them populated in the COM
object? We are passing other variants ByRef from vbScript to the COM object
and they are returning proper values, however one is an Integer, the other
is a String. The only problem seems to be with the Variant Array. Thanks
for the response, and help is desperately needed! :)
Quote:
> Sounds like the problem is in
> ....code to populate vArray...
> --
> Michael Harris
> MVP Scripting
Quote:
> What is wrong with this???
> Com object.method definition...
> Public Sub foo(ByRef vArray As Variant)
> ...some code
> vArray.ReDim (x,y)
> ....code to open ADO recordset
> ....code to populate vArray...
> End Sub
> in vbScript...
> .
> Dim vArrayInput
> ' RDS is already created as a Remote Data Services Dataspace object
> Set MyObject = RDS.CreateObject("Object.class", "<%=server%>")
> Call MyObject.foo(vArrayInput)
> 'the object is properly created, and the call to the method is successful
> 'however the input parameter array variable (vArrayInput) is
> 'properly dimensioned in the MyObject.foo method, but the array
> 'elements are all empty except for element (0,0) which is now set to 0.
> 'The call to MyObject.foo works perfectly using the same syntax on
> 'server side (ASP), and also from a call in a Visual Basic App.
> 'Any help or ideas is most appreciated!