Re: Session Vars and cfquery - cflock where?

2002-03-16 Thread Sharon DiOrio

Generally speaking, you don't want to put a lock around a process that might
take awhile.  It slows everything down.  Copy the variable to local or
request scope before using.

cflock scope=SESSION type=readonly timeout=10
cfset REQUEST.myVar = SESSION.myVar
/cflock

Sharon
- Original Message -
From: Brunt, Michael [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, March 15, 2002 2:07 PM
Subject: Session Vars and cfquery - cflock where?


 When using a session variable in a cfquery where should the cflocks be?
 Around the whole cfquery or just around the line calling the session var?

 Mike Brunt
 Sempra Energy
 213.244.5226

 An elephant is a mouse with an operating system.


 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Session Vars and cfquery - cflock where?

2002-03-15 Thread Brunt, Michael

When using a session variable in a cfquery where should the cflocks be?
Around the whole cfquery or just around the line calling the session var?

Mike Brunt
Sempra Energy
213.244.5226

An elephant is a mouse with an operating system.  


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Session Vars and cfquery - cflock where?

2002-03-15 Thread Elizabeth Walter

You can always localize your session variable like this:

cflock scope=session timeout=20 type=exclusive
cfset myLocalVar = #SESSION.myVar#
/cflock

You can use the local variable myLocalVar in your query.  That way you don't
have to lock large chunks of code.

-Elizabeth

-Original Message-
From: Brunt, Michael [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 2:08 PM
To: CF-Talk
Subject: Session Vars and cfquery - cflock where?


When using a session variable in a cfquery where should the cflocks be?
Around the whole cfquery or just around the line calling the session var?

Mike Brunt
Sempra Energy
213.244.5226

An elephant is a mouse with an operating system.  



__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists