At 04:16 PM 7/20/2004, you wrote:
> "that's totally unneeded" That's an assumption not a fact. It > may be unneeded to you, however I feel it is a nice way to > initialize the variables.
We can probably argue this back and forth, but you cannot deny that it is fact that you need not initialize a variable in the same form as you plan on using it. Therefore, it is not necessary to define X with queryNew() if you plan on using it as a query later on.
I can see situations where it may be helpful, but for the most part I use the empty string initialization too.
For example:
<cffunction>
<cfset var MyQuery = QueryNew()>
<cftry>
Some Code
<cfquery name="MyQuery"> </cfquery>
<cfcatch>
</cfcatch>
</cftry><cfif MyQuery.RecordCount GT 0> Do stuff </cfif>
<cfreturn> </cfffunction>
If "some code" throws an error, then the query is never initialized and the "myquery.recordcount" condition will throw an error.
--
Jeffry Houser, Web Developer, Writer, Songwriter, Recording Engineer
<mailto:[EMAIL PROTECTED]>
--
AIM: Reboog711 | Phone: 1-203-379-0773
--
My Books: <http://www.instantcoldfusion.com>
Recording Music: <http://www.fcfstudios.com>
Original Energetic Acoustic Rock: <http://www.farcryfly.com>
----------------------------------------------------------
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]
