Array's from COM to vbScript

Results 1 to 2 of 2

Thread: Array's from COM to vbScript

  1. #1
    Join Date
    Dec 1969

    Default Array's from COM to vbScript

    I have found a few articals about passing arrays into COM but I am having a problem the other way.<BR><BR>My VB object has a property that returns a single dimensioned array. When I test my com in VB I have no problems. When I call my object from ASP I get:<BR><BR>set qs = server.createobject("myLib.blah")<BR>[...set some db params...]<BR>qs.refresh &#039;loads up the properties<BR><BR>&#039;grab the arrays<BR>aLables = qs.lables<BR>aValues = qs.values<BR><BR>response.write isArray(aLables) &#039;returns true<BR>response.write ubound(aLables) &#039;returns 9<BR>response.write typename(aLables) &#039;returns String()<BR><BR>response.write aLables(0) &#039; returns type mismatch error ??<BR><BR>I have tested using the same array contents in VB and it works fine.<BR><BR>Any ideas?<BR><BR><BR>David Chisholm<BR><BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Try declaring the..

    .. array, in VB as a Variant instead of a String.<BR><BR>See if that helps?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts