Passing Arrays to a Function in ASP (VBScript) 
Author Message
 Passing Arrays to a Function in ASP (VBScript)

How do I call a function in ASP (VBScript) passing two 2-dimensional
arrays as parameters and then pass an array back to the function call?
 It seems to have a problem (within the function) recognizing that the
parameters passed are 2-dim arrays.  Here is a summary of what I am
trying to do:

Dim OldData
Dim NewData
Dim rsOld
Dim rsNew
Dim AllData

*** Run queries to get recordsets ***

OldData = rsOld.GetRows()
NewData = rsNew.GetRows()
AllData = AppendData(OldData, NewData)
*
*
*
Function AppendData (OldArray, NewArray)

  Dim TempArray
  Dim sizeOldArray
  Dim sizeNewArray

  sizeOldArray = UBound(OldArray, 2)  <--*** ERROR OCCURS HERE ***
  sizeNewArray = UBound(NewArray, 2)

  *** Perform loops to copy OldArray and NewArray into TempArray ***

  AppendData = TempArray

End Function

This is the error message I get:
  Microsoft VBScript runtime error '800a000d'
  Type mismatch: 'UBound'

ANY IDEAS WOULD BE HELPFUL....THANKS!



Tue, 26 Jul 2005 06:02:50 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Passing Arrays between ASP/VBScript and ActiveX Components...

2. Passing MultiDimensional Array from ASP to VBScript

3. Passing array between ASP script(vbscript) and javascript

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

5. Passing array from ASP (VBScript) to DLL and back

6. Passing Arrays between ASP/VBScript and ActiveX Components...

7. ASP VBScript function like Server.Execute which can pass variables

8. Passing VBScript array to JavaScript function

9. Passing arrays in VBScript functions

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

11. ASP ot VBScript / VBScript to ASP

12. Passing Arrays from VB .Net to ASP

 

 
Powered by phpBB® Forum Software