> > > <cflock scope="application" timeout="2" type="exclusive">
> > >      <cfset application.GetListings = Request.GetListings>
> > > </cflock>
> >
> > First, you shouldn't CFLOCK the query. All CFLOCK does is 
> > limit who can execute the code at a given time. You don't 
> > have any memory variables within the query that need to be 
> > protected from concurrent accesses, so you don't need to use 
> > CFLOCK.
...
> So are you saying we don't need to follow Allaire's Best Practices 
> recommendation?  (This is where the cflock example below came from.)
> 
> Or, is your statement "First, you..." referring to something else?

I was saying that you shouldn't place the CFQUERY tag within a CFLOCK, which
was your original question, as I understood it:

> Should I CFLOCK the following query?
> 
> <CFQUERY NAME="Request.GetListings" DATASOURCE="#request.DSN#" 
> USERNAME="#request.USER#" PASSWORD="#request.PASS#"  
> cachedwithin="#createtimespan(0,0,15,0)#">
> SELECT ID,org_name,contact,city,website_bt,email_bt,classified_bt,
> fax_bt,TList
> FROM Orgs (nolock)
> WHERE Class = #VAL(request.hdg_id)#
> <CFIF "#CLIENT.CITY#" IS NOT "All Cities" >AND City = 
> '#CLIENT.CITY#'</CFIF>
> ORDER BY org_name
> </CFQUERY>

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to