You can auto-cache the results of stored procedures by calling them via the
CFQUERY tag, instead of the CFSTOREDPROC tag. This will only work if you
are using the SP to return a single result set and you aren't using output
parameters.
Bob
-----Original Message-----
From: Marsh, Jeffrey B [mailto:[EMAIL PROTECTED]]
Sent: April 18, 2001 2:11 PM
To: Fusebox
Subject: RE: Setting Query as an Application Var
Letting CF cache the queries is great for "in-line" queries. I use it all
the time. In the past, and hopefully in the near future, I hope to use
stored procedures. The only way I've found to do this is to place the query
results in the application scope. Whenever the data is modified, I use a
similar method as Noam to "refresh" the application scoped queries.
---
Jeffrey B. Marsh
Professionals built the Titanic.
Amateurs built the Ark.
-----Original Message-----
From: BOROVOY Noam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 6:27 AM
To: Fusebox
Subject: RE: Setting Query as an Application Var
It sure is easier to let CF handle the caching of queries and the speed is
great, we don't bother with loading it into any scope, just include the
query into local scope.
To handle refreshing we use two methods:
1. "manual" refresh by setting a flag on the URL which changes the
CachedWithin to 1 second, causing the query to refresh.
2. "automatic" by having the templates which modify the underlying data
hitting a query refresh template with CFHTTP with a timeout of 1 to prevent
waiting.
HTH,
Noam
----------
From: Bert Dawson [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, 18 April 2001 14:07
To: Fusebox
Subject: RE: Setting Query as an Application Var
just set the NAME attribute of cfquery tag to "application.whatever"
(the
same works for other scopes).
However, if you're going to stick it in the application scope you're
going
to have to lock it whenever you reference it...
You might be better off ptting it in the request scope and using
query
caching,
eg
<cfquery datasource="#request.dsn#"
name="request.myquery"
cachedwithin="#request.mytimespan#">
SELECT this
FROM that
</cfquery>
Then you'll have to work out how to refresh it, but then you'd have
to do
that anyway if you were putting it in the application scope....
Bert
> -----Original Message-----
> From: Trent Shepherd [mailto:[EMAIL PROTECTED]]
> Sent: 18 April 2001 12:54
> To: Fusebox
> Subject: Setting Query as an Application Var
>
>
> Hi Guys and Gals
> I am looking to set the result of a query to an appliaction
> variable. This will be for a menu item.
> Can anybody tell me whether this can be done and/or show me
> sonme examples of code.
>
> Thanks in Advance
>
> Trent Shepherd
> Nemas
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists