Jim, Whether you use . . .
<cfset var myQuery = QueryNew() /> <cfquery name="myQuery"... . . . or . . . <cfset var myQuery = "" /> <cfquery name="myQuery"... . . . is really all a matter of preference and style. The first one incurs slightly more overhead, since it creates a query object instead of a string. However, if there is the possibility of returning that query object from a function call (in other words, you never replace that query variable using a cfquery call), then it could be necessary in order to conform to the return type of the function. ><cfset var local = StructNew() /> ><cfquery name="local.CheckAgent"... Your use of CFSET var local = StructNew() should work nicely. Roland -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Davis Sent: Friday, September 24, 2004 12:05 PM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Testing Thread Safety Sorry to - butt in but something somebody said earlier just now struck me. It was mentioned that people are doing something like the following to make queries thread safe: <cfset var myQuery = QueryNew() /> <cfquery name="myQuery"... Is that needed? It would seem to me, first that the following would work just as well and not require the additional function: <cfset var myQuery = "" /> <cfquery name="myQuery"... However my main concern is that my solution works which is the following: <cfset var local = StructNew() /> <cfquery name="local.CheckAgent"... I've labored (and labored and labored) under the assumption that the above is thread-safe. Is it? Opinions? Since I'm brain dead and working on a hundred different things anybody have a simple way to test? Thanks, Jim Davis ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
