Problem transfering arrays

Results 1 to 2 of 2

Thread: Problem transfering arrays

  1. #1
    Join Date
    Dec 1969

    Default Problem transfering arrays

    I already looked at the FAQ, and the array section does not solve my problem.<BR><BR>Here are pieces of code that show what I am trying to do:<BR><BR><BR>[ Global.asa ]<BR><BR>dim applicationArray(20)<BR><BR><BR><BR>[ Some ASP page ]<BR><BR>dim localArray, counter<BR>localArray = Application("applicationArray")<BR>for counter = 0 to 20<BR> localArray(counter) = localArray(counter) & someOtherInfo<BR> response.write localArray(counter)<BR>next<BR><BR><BR><BR>[ And in some ASP page ]<BR><BR>&#039; Lets assume that another local array has been declared and <BR>&#039; played around with - its definition: localArray(20)<BR><BR>Application("applicationArra y") = localArray<BR><BR><BR>============================ ===========================<BR>This does not seem to work. Can anyone tell me how to fix this piece of code? Obviously this is not exactly what I&#039;m doing, but its the idea in minor scale.<BR><BR>Thank you,<BR>Mario Aguilera

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs *do* give this answer!

    In the category "arrays"! The question about arrays in session and application variables.<BR><BR>Your problem starts right here:<BR>dim applicationArray(20)<BR><BR>Nope. Read the FAQ!<BR><BR>dim applicationArray()<BR>REDIM applicationArray(20)<BR><BR>You *must* use the REDIM or you *will* have problems!<BR><BR>

Posting Permissions

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