Skip to main content
August 16, 2012
Question

cflock read only

  • August 16, 2012
  • 1 reply
  • 447 views

We use many static application variables to populate pick boxes and compare them to form values in the process. They are also used to validate input from text boxes.

Lately, we have been seeing an error saying that a 2 character code is exceeding the maxlength of 2 in a cfqueryparam tag.

When the application variables are refreshed, the error goes away for a few days or a few months, but eventually comes back.

Could this be caused by not having cflocks around the populating and comparing with application variables ?

    This topic has been closed for replies.

    1 reply

    Inspiring
    August 16, 2012

    Well it could be. It's even more of a shot in the dark for us than it is for you, given we don't have your code in front of use to check.

    Is there any chance two consecutive requests could hit the initialisation / setting code at the same time, and accordingly add to this variable twice?  if so... yeah, you need some locking.

    Anything set in the application scope should be written in onApplicationStart() though, if poss.

    --

    Adam