开发者

This array is fixed or temporarily locked(in asp)

开发者 https://www.devze.com 2022-12-28 17:59 出处:网络
I want my multidimensional array to be dynamic, when I am trying to do that using reDim i am getting the error \"This array is fixed or temporarily locked:ref开发者_JAVA技巧Arr \", Following is my cod

I want my multidimensional array to be dynamic, when I am trying to do that using reDim i am getting the error "This array is fixed or temporarily locked:ref开发者_JAVA技巧Arr ", Following is my code:

max=10
dim refArr(10,2)


dim i
i=0
while not rs1.eof

        max=max+1
        redim refArr(max,2)

    niftyChange=0

        refArr(i,0)="niftyDate" 
        refArr(i,1)="temp"

    i=i+1
    rs1.movenext

wend


If you are going to ReDim it, you need to dim it with no size initially:

dim refArr() 

I think you actually want to use ReDim Preserve, though, to keep the existing data.

0

精彩评论

暂无评论...
验证码 换一张
取 消