>
> the _ character is indeed legal in CF
> >
> >
> >
> > Yup. I did manage to run into an instance where ColdFusion would throw
> > an error when trying to create or reference a variable name begining with an
> > underscore though. I can't remember where but it may have been a
> > query cfloop: <cfloop query="_theQuery">. Should have written it down!
> >
>
I just ran into the situation where the underscore causes a problem so I
thought I'd right it down this time ;)
Lo and behold it is when doing a query of queries(!) when the query name
begins with an underscore; try running the following and you get an error:
<cfset _qTarts = Querynew('')>
<cfset QueryAddColumn(_qTarts, 'flavours',
ListToArray('strawberry,lemon,blackcurrant,fruits of the forest'))>
<cfquery name="myQoQ" dbtype="query">
SELECT * FROM _qTarts
</cfquery>
<cfdump var="#myQoQ#">
Change it to this and all is dandy:
<cfset _qTarts = Querynew('')>
<cfset QueryAddColumn(_qTarts, 'flavours',
ListToArray('strawberry,lemon,blackcurrant,fruits of the forest'))>
<cfset qTartsReference = _qTarts>
<cfquery name="myQoQ" dbtype="query">
SELECT * FROM qTartsReference
</cfquery>
<cfdump var="#myQoQ#">
Hope this reference helps somebody pulling their hair out ;)
Dominic
--
Blog it up: http://fusion.dominicwatson.co.uk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299802
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4