
Passing a muti dimensional arrary from ASP to VB
Quote:
>I'm passing a two dimesional array from an ASP page into an ActiveX
>component written in VB 6. Can anyone tell me how I should receive
>this array in VB and how to iterate through it's contents and
>dimensions? Thank you.
Couple of things to try..
1. Try passing the array as a variant array. ASP stores everything as
variant anyway. If you can make a property of the ActiveX component
variant, just try passing the array to that propery and use the
functions IsArray, Lbound, Ubound to figure out if it is an array and
it's dimensions.
2. Use the functions 'split' and 'join' in VBScript and VB to build a
single string which represents your array, something like this (syntax
may be incorrect, just putting down ideas)
Dim sRow(ubound(arr,1))
for i = lbound(arr,1) to ubound(arr,1)
sRow(i) = split(arr(i,1), "|")
next
sOut = split(sRow, "^")
Then use join on the other end to rebuild the array.
Dan Bush
Battle Ground.wa.us
Please No Spam, to email, change .com to .net