Creating Variables

Results 1 to 2 of 2

Thread: Creating Variables

  1. #1
    K. Zig Guest

    Default Creating Variables

    I would like to have my program create variables on the fly. Is this possible? I have a "Do While Loop" in my code which loops as many times as the number from the database result equals.Each time it loops, it subtracts 15min from a time variable. <BR><BR>I would like the new time result to be stuffed into a NEW variable each time the loop occurs.<BR><BR>Please let me know if this is possible or if there is a better way.<BR><BR>Thanks to DUDE for your answers earlier today.

  2. #2
    ozKen Guest

    Default RE: Creating Variables

    Would an array solve your problem? eg.<BR>do while not RS.EOF<BR> icount = icount + 1<BR> aTime(icount) = Timevar<BR>....<BR>loop<BR>-------<BR>If you know the size of the record, you can set the array size earlier with DIM. Else, you may have to put a REDIM in your code. There is a tutorial on DIM/REDIM at http://www.activeserverpages.com/learn/<BR><BR>It&#039s not necessarily a "NEW" variable, but at least you know what the name is called and you can reference it if you need it later.

Posting Permissions

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