I know that this topic has been addressed many times, but is the following
code the preferred method of CFLOCKING an application variable for a CFQUERY
that will only execute once, or should the lock go around the whole thing
because of the IsDefined block?
<CFIF Not IsDefined("application.States")>
<CFQUERY NAME="getStates" DATASOURCE="#dsn#">
SELECT States from StateTable
</CFQUERY>
<CFLOCK SCOPE="Application" TIMEOUT="30" TYPE="Exclusive">
<CFSET application.States = ValueList(getStates.States)>
</CFLOCK>
</CFIF>
tom
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]