That's going to add some overhead (creating a query object) that's totally unneeded. CF is loosely typed, and this is one place that it makes perfect sense to utilize that, and just initialize variables to a simple value (like the empty string). Of course, this hackery is mandated by the fact that you have to initialize a variable when you declare it (unfortunate), but that's life.
Cheers, barneyb > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Bryan F. Hogan > Sent: Tuesday, July 20, 2004 12:36 PM > To: [EMAIL PROTECTED] > Subject: Re: [CFCDev] Making Persistant CFCs thread safe > > That's right, you should var all variables created within the CFC. > Queries, WDDX, CFFILE, CFDIRECTORY, etc, etc. > > I've been in a habit of var scoping my queries like below. > > <cffunction ....> > > <cfset var myQuery=queryNew('undefined')> > > <cfquery name="myQuery" ...> > > </cffunction> > ---------------------------------------------------------- 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]
