>><cfoutput> <cfloop collection="#variables#" item="i"> <cfif isquery(variables[i])> #i#: #variables[i].recordcount# records<br> </cfif> </cfloop> </cfoutput>
>>That code would assume the queries existed in the variables scope and had been run on that page. Exact, but even so, it appears that the variable scope itself is not available from the error template, though the form scope is. By the way, may be the request scope is, so putting all queries in the request scope could be a solution. Having all queries in the session scope is definitely too costly performance wise, and using the Application scope would made the application a one user only application. >>The sessiontracker method in the service factory will give you everyone's sessions, but I don't know that the performance of recursing that struct would be advisable. If the queries were defined in the session, I wouldn't have to parse everyone's session, only the session that caused the error, but I don't think putting all queries in session variables wouls be wise. >>The contents of the variables scope is destroyed at the end of the page load anyway Right, but by definition, errors occur before the end of the page load, so there is no reason the variable scope would not be available from the error template defined in CFERROR, just like the form scope, which is also destroyed after page load. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 beta â Build next generation applications today. Free beta download on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280642 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4