1 Reply Latest reply on Jan 15, 2013 12:24 PM by Adam Cameron.

    application variable changing in length

    lwfg Level 1

      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 ?

        • 1. Re: application variable changing in length
          Adam Cameron. Level 5

          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