> Thanks Charlie (figured that may be it)...so how do I scope a
> query name returned from CFQUERY given the situation I outlined?
>
> I suppose I could do this (which IMHO sucks):
>
> <cfquery name="q1">...
>
> <cfset var.resultQuery = q1>
>
> <cfreturn resultQuery>
>
> Seems like a lot of extra work to me (well...OK...1 extra
> line to scope it...but it "feels" like a waste ;-)
VAR isn't really a scope, it's just a keyword telling CF to make the
variable local to the function. Your VAR statements have to follow any
CFARGUMENT tags you have, but precede anything else:
<cffunction ...>
<cfargument ...>
...
<cfset var q1 = "">
...
<cfquery name="q1" ...>
...
<cfreturn q1>
</cffunction>
> So does the VAR scope keep variables local to the method that
> sets them?
Yes.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257075
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4