Following on from that. Do a check in the custom tag to see if the query data already exists, if it does, use it, if it doesn't, get it. Or, if you're passing the query data into the tag then you will have done one query anyway.
Ade -----Original Message----- From: Alan Rother [mailto:[EMAIL PROTECTED] Sent: 25 October 2005 03:39 To: CF-Talk Subject: Re: Query result set; making it available to custom tags when query is run from CF template? Well, if the one query contains all of the data needed by all of the custom tag calls in the same page request, you could just set the query into the request scope and it would be available to all of the custom tag calls. To do that simply follow this example: <cfquery datasource="myDataSource" name="Request.qMyQueryName"> Doing this, any cfm file in the same request can access this query object HTH On 10/24/05, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote: > > I'm trying to improve a page I've written. It's a calendar, and I'm > using a custom tag to display the calendar itself. On one view of the > calendar, there can be four calls to that calendar custom tag (one for > the current month, 3 for the next 3 months). Rather than call the > same stored procedure once per custom tag call, I'd rather call it > once total from the CFM template, and then make that result set > available to the custom tags. > > Is there a way to accomplish this, or do I just need to make multiple > calls to get the recordset? > > Thanks, > > Pete ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225308 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54