Skip to main content
January 15, 2013
Question

application variable changing in length

  • January 15, 2013
  • 1 reply
  • 476 views

We use static data a lot and keep it in application variables (arrays) instead of querying over and over.

Select-option elements are populated with the arrays.

After a few days to a few weeks, we get an error when an update query is run - that the length of the data in the application var exceeds the length specified in the cfqueryparam.

The field width is 2 and so is the specified length.

We refresh the application variables and that fixes things for a time. The code with the error runs fine hundreds or thousands of times before the error comes back.

Could the array value change in length ?

Could something else be causing this ?

    This topic has been closed for replies.

    1 reply

    Inspiring
    January 15, 2013

    Could the array value change in length ?

    Not by magic, no. But if you tell it to: yes.

    Could something else be causing this ?

    Yep. Somewhere in your code something is happening that you didn't expect, and this is causing unexpected results.

    What troubleshooting have you thusfar done to sort this out?

    It doesn't sound like you've even inspected the variable which has the value you're not expected to see whether that suggests anything.

    Shooting in the dark will get you nowhere.

    --

    Adam