Skip navigation
lwfg
Currently Being Moderated

cflock read only

Aug 16, 2012 5:42 AM

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 ?

 
Replies
  • Currently Being Moderated
    Aug 16, 2012 7:16 AM   in reply to lwfg

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points