problem with asp array..

Results 1 to 2 of 2

Thread: problem with asp array..

  1. #1
    Join Date
    Dec 1969

    Default problem with asp array..

    hey everyone.. this is my code:<BR>for p=0 to UBound(recordArray)<BR> tempiRecArray=Split(recordArray(p),",")<BR> temptext = tempiRecArray(1)+","+tempiRecArray(2)+","+tempiRec Array(3)+","+tempiRecArray(4)+","+tempiRecArray(5) <BR> if tempnewline= temptext then <BR> response.redirect "viewSort.asp"<BR> end if<BR>next<BR><BR>i keep having this error:<BR>Subscript out of range: &#039;[number: 1]&#039;<BR><BR>it keep point to the tempiRecArray array... saying that it is out of range...<BR>And the most weird part is that, the code was at first working... but after sometime of using it, it suddenly give mi this error... i dunno wat goes wrong... can anyone help mi? thanks...

  2. #2
    Join Date
    Dec 1969

    Default RE: problem with asp array..

    first up, there&#039;s no such thing as an ASP Array. it&#039;s a VBScript array, since ASP is NOT a language.<BR>second, looks to me like you&#039;re just assuming the SPlit() will return an array. check the Ubound of what the SPlit() returns and I think you&#039;ll find that it&#039;s not actually working there. so the error is either in the input or in your assumptions about the input.<BR><BR><BR>j<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