You should look into the CACHEDAFTER and CACHEDWITHIN attributes of the
CFQUERY tag. This will allow you to keep queries in memory for a period of
time that you indicate using the CreateTimeSpan(days, hours, minutes,
seconds) function. Every time the query is run with exactly the same
parameters it will be served from memory not requiring an additional trip to
the database.

Bryan LaPlante
816-347-8220
[EMAIL PROTECTED]
http://www.netwebapps.com
Web Development

----- Original Message -----
From: "Hamid Hossain" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, June 02, 2001 12:39 AM
Subject: Store Query in APPLICATION variable


| Hi folks,
|
| I want to store a query results in an APPLICATION
| variable. So, it will be available for all users with
| making the call through ODBC every time.
|
| for examble:
|
| the query may be for Countries like:
|
| <cfquery datasource="DS" name="GetCountries">
|   SELECT * FROM Countries
| </cfquery>
|
| then, I will use it with a loop to make HTML drop-down
| menu with <SELECT>
|
| Is there a way to do that ? please tell me if it is
| important to use <CFLOCK> with the previous code.
|
| Thanks
| Hamid Hossain
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to