Many thanks to Dave and Steve! With that combined genius and further 
experimentation, I think I have a cross-version solution: I'll use 
NAME="#Session.SessionID#" with session variable locks, and 
NAME="#Application.ApplicationName#" with application variable locks.

I discovered, strangely, that ANY OTHER name in either case fails on 4.5.1, at least 
with FULL CHECKING on. For example, CF 4.5.1 doesn't let me use 
NAME="Test_#Application.ApplicationName#". Is that a bug or a feature? (My host, a 
well-known company, says they must keep FULL CHECKING on to protect the 
environment on a shared server.)

Gene

Dave Watts wrote:
> If you need backwards compatibility, don't use the new SCOPE attribute;
> use the NAME attribute instead. That's all you have to do. If you're
> working with only 4.5.1 servers, you'd be better off using the SCOPE
> attribute, but since you're not, you'll have to stick with NAME.

Steve Nelson wrote:

> If you wrote your locks in 4.01
> syntax it would work in both.
> 
> <cflock name="#application.applicationname#" type="exclusive"
> timeout=20>
 
Gene Kraybill wrote:
> >  
> > Does anyone know a way to use CFLOCK so it works in both CF 4.0.1 and
> > 4.5.1?
> > 
> > I have an application written using the older CFLOCK parameter
> > of "NAME", rather than the new ones of "SCOPE" and "TYPE". I know Allaire
> > has a wizard to convert CFLOCKs to the new parameters, but my problem is I
> > need to be able to run the same code on BOTH 4.0.1 and 4.5.1. The 4.5.1
> > server has "full checking on" for security reasons (beyond my control), so
> > if I include both the old and new parameters with each CFLOCK, it throws
> > an error.
---------------------------------
Gene Kraybill
LPW & Associates LLC
www.lpw.net
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to