dynamic array

Results 1 to 2 of 2

Thread: dynamic array

  1. #1
    yls Guest

    Default dynamic array

    hi , i want to the below<BR><BR> dim tempemail(2), icount<BR> while not rs.eof<BR> tempemail(icount)=rs("agencyemailaddress")<BR> icount=icount+1<BR> rs.movenext<BR> wend <BR><BR>say i dont want to limit my array to be tempemail(2) but should be dynamic.. is it the below <BR> redim preserve tempemail(icount)=rs("agencyemailaddress")<BR><BR> hwo about the counter?<BR>how to declare the dynamic array?<BR>thanks1!<BR>

  2. #2
    Joseph Price Guest

    Default RE: dynamic array

    Hey There-<BR><BR>Your code looks good, to dim a dynamic array, just use this:<BR><BR>dim aryX() <BR><BR>with no parameters for the array<BR>you may have to modify the code a little to read like this:<BR><BR>dim tempemail(2), icount<BR>while not rs.eof<BR>redim preserve tempemail(icount)<BR>tempemail(icount)=rs("agencye mailaddress")<BR>icount=icount+1<BR>rs.movenext<BR >wend <BR> <BR>- Joe Price<BR>jkprice@gte.net<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