# Error '800a000a'



## coachdan32 (Nov 13, 2003)

I am getting a strange error message:


VBScript runtime error '800a000a'
This array is fixed or temporarily locked


I did a Google Search and there is nothing really listed on the error message. The error is being thrown within the following code excerpt. The line in particular is the line that starts "For C =".
I am attaching the entire pages code in case it is needed.


KCO = Request.Form("KCOCodes").Count



Dim KCOCodes(35)
Dim C

For C = 1 to KCO
CurRecs = (Request.Form("KCOCodes").Count)
REDIM PRESERVE KCOCodes(CurRecs)
Next


----------



## coachdan32 (Nov 13, 2003)

For some rreason the file did not get attached. I will try again.


----------



## Rockn (Jul 29, 2001)

Put a fixed number in for your variable and see if it works. If it does the the count returned from the Request.Form is not working.


----------



## coachdan32 (Nov 13, 2003)

Rockn,

Do you mean like this:

For C = 1 to KCO
CurRecs = 28
REDIM PRESERVE KCOCodes(CurRecs)
Next


----------



## Rockn (Jul 29, 2001)

Where KCO=(set value) where you defined the variable earlier in your code.


----------



## coachdan32 (Nov 13, 2003)

Rockn,

Putting a set value in did not change the error message. Do you have any ideas what else it may be?


----------



## Rockn (Jul 29, 2001)

Your code looks like it is trying to redefine a variable that was passed from the previous page

KCO = Request.Form("KCOCodes").Count 

Dim KCOCodes(35).....Not sure why this has a fixed value

And then giving the same variable you used for KCO to this variable:

CurRecs = (Request.Form("KCOCodes").Count)

Do a CurRecs = KCO


----------



## coachdan32 (Nov 13, 2003)

Still gets the same error.

On the Dim KCOCodes(35)...I was trying to duplicate the coding that was used on another page that Gibble helped me fix. He had the array setup that way. There are 35 fields called KCOCodes that are numbered accordingly. It represents 7 days per week times 5 weeks in a period.


----------



## coachdan32 (Nov 13, 2003)

I tried taking the 35 out of code and it comes back:

Type mismatch: 'KCO'


----------



## Rockn (Jul 29, 2001)

With the 35 set it looks like you are trying to get dynamic and static arrays out of the same array, I think you need to make it one or the other. The array can't be 35 if the field count from the form brings back a different number.


----------



## coachdan32 (Nov 13, 2003)

Thanks for the help. I have figured out the problem. It's a long story!


----------

