Passing a muti dimensional arrary from ASP to VB 
Author Message
 Passing a muti dimensional arrary from ASP to VB

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.


Sat, 18 May 2002 03:00:00 GMT  
 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



Sat, 18 May 2002 03:00:00 GMT  
 Passing a muti dimensional arrary from ASP to VB
Great, thank your for your time and advice Daniel!

On Tue, 30 Nov 1999 12:38:35 -0800, Daniel Bush

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




Sat, 18 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing Multi-Dimensional arrays to COM objects from VBScript/ASP

2. Empty Arrary when VBScript calls VB COM object.

3. passing a 2 dimensional array from word to excel

4. Passing Multi-dimensional SAFEARRAY from VB6 to VC++6 DLL

5. How to pass 2 dimensional array to function.

6. Sort a multi-dimensional array in VBScript? (ASP)

7. 2 dimensional variant array passed to SQL 7

8. passing a multi dimensional array to vbs

9. ASP : Passing values from One ASP to the Next

10. passing array from componet to asp: cann't display all the infor from asp

11. Passing a string from asp to asp

12. ObjectContext vs. Passing ASP objects from ASP page

 

 
Powered by phpBB® Forum Software