Copying dynamic session arrays to local variables

Results 1 to 2 of 2

Thread: Copying dynamic session arrays to local variables

  1. #1
    ASPDoofus Guest

    Default Copying dynamic session arrays to local variables

    I&#039m building a site that logs a user on, creates session level arrays and populates them with the &#039accounts&#039 the user has access to. I want to display these in a pick list on another page, but I&#039m having trouble (re)dim-ing the arrays locally.<BR><BR>My current un-code looks something like this:<BR>dim i<BR>i = session("TotalFunds") &#039*****(THIS IS THE NUMBER OF ELEMENTS IN THE ARRAY)<BR>dim locAccountName(i)<BR>dim locAccountNumber(i)<BR>locAccountName = session("AccountNames")<BR>locAccountNumber = session("AccountNumbers")<BR><BR><BR>I will be forever in the debt of the person who can help me out with this!

  2. #2
    Join Date
    Dec 1969

    Default RE: Copying dynamic session arrays to local variab

    for a log in type system why don&#039t you use a relational type database (type thing) instead.. ie: next to their user id and pass there is a list of what they are allowed access to...<BR><BR>i try to never go over using one session in any application.. heck u can build your own type of `session`<BR><BR>anyways to answer your question do the following:<BR><BR>Dim arrayname() &#039no number inside the ()<BR>Dim x<BR><BR>For x = 0 to sessionmaxwhatever<BR> ReDim PRESERVE arrayname(x)<BR><BR> arrayname(x) = yournewvalue<BR>Next<BR><BR>i hope that gives you an idea of how to maipulate arrays.. i think u need to be more specific about what u want

Posting Permissions

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