|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Can I tell ColdFusion to dump me all run query names?
Is there a way to ask ColdFusion to dump the names of all the CFQuery resultsets?Stephen Cassady 09/07/10 05:57 A Depends how you've scoped them. Here's a quick example if they're unscoped:Peter Boughton 09/07/10 06:09 A Is there a way to ask ColdFusion to dump the names of all the CFQuery resultsets? For example, I have some code that runs several cfqueries - the specific ones change based on circumstance - at the request of a page. What I would like to do is dump some sort of variable created by CF that lists me all the names of the CFquery resultsets. It's late - I've likely not enunciated my problem well. Stephen. Depends how you've scoped them. Here's a quick example if they're unscoped: <cfloop item="CurVar" collection="#Variables#"> <cfif isQuery(Variables[CurVar])> <cfdump var=#Variables[CurVar]# label=#CurVar# /> </cfif> </cfloop> If you've got multiple scopes used, and/or function local ones, then use a debugging template instead. I have written a stack trace tool that will dump all function calls and QUERIES of REQUEST call. This uses the coldfusion service factory. You can get the complete code at http://ketanjetty.com/coldfusion/monitor/stack-trace/ Ketan Jetty http://KetanJetty.com
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||