Passing names of arrays stored in session object to function 
Author Message
 Passing names of arrays stored in session object to function


I have a function that changes the value in one of three arrays. I
want to pass the name of the array to be changed as an argument to my
function such as;

Function MyFunction(Arrayname)

TmpArray = Session.Contents(Arrayname)

        Do whatever to TmpArray

Session.Contents(Arrayname) = TmpArray

End Function

The problem is, when I try and call the function I get a Type Mismatch
error. What am I doing wrong?



Sun, 03 Feb 2002 03:00:00 GMT  
 Passing names of arrays stored in session object to function
You can't pass a array name as a function argument. (I never see anything
like this).

Instead you can pass the entire array as an argument.

function MyFunction(byRef Arrayname)
    tmp.ArrayName = Session.Contents(ArrayName)
end function

to call the function:

I think that you will need to write 3 functions to make dynamic decisions in
your application.


                   from BRAZIL

Sun, 03 Feb 2002 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. An intrinsic object cannot be stored within the Session object

2. using methods with JScript objects stored in session object

3. Storing ATL-object in the Session Object??

4. Passing Array to Session Variable Then back to Array

5. Passing a valid Session Object from .NET to VB 6 objects

6. How to pass Database name and Stored Procedure Name at run time in subreports

7. How to pass an integer array/userdef type array into an Oracle Stored procedure

8. Storing JScript Arrays in a Session Variable

9. storing a 2 dimensional array in a session variable

10. Help! Storing Arrays in Session Variables - problem

11. Storing arrays in a Session Variable

12. Q-Function-name passing to other function


Powered by phpBB® Forum Software