> So I created an application.cfm file and placed it in the same directory as
> all my other .cfm files. In it I did a bunch of named <CFQUERY>s to retrieve
> the legal values as part of application initialization.
I think what you did is:
APPLICATION.CFM:
<CFQUERY name="myQ" ....> .... </CFQUERY>
OTHER.CFM
<CFOUTPUT query="Application.myQ"> ....
Kind of thing. In this case, your myQ query only exists in
application.cfm. You have to assign the query to an application level
variable. You could do this:
APPLICATION.CFM:
<CFQUERY name="Application.myQ" .....>
And then OTHER.CFM would see it correctly.
> use application level variables? Is it true that these queries will be
> executed only once in the application or will they be executed whenever any
> template is launched (when the automatic inclusion of Application.cfm
In the above case, the query will be executed every time a CFM
file in that directory is loaded. So to make this more efficient you would
go:
APPLICATION.CFM
<CFIF NOT isDefined("Application.myQ")>
<CFQUERY name="Application.myQ" datasource="mySource">
SELECT * from tblBlah
</CFQUERY>
</CFIF>
That way it's only run once.
Tariq Ahmed - [EMAIL PROTECTED] - ICQ 6308515
TIBCO Finance Technology - Web Group - Senior Web Engineer
Work: 650-461-3472 Pager: 800-759-8888x1702632 Fax: 650-461-3003
3375 Hillview Avenue. Palo Alto, CA. 94304.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.