On a side note

this bit of code will not work if you have arrays queries (although i have
yet to put a query into a session variable) and structs COM etc.

-----Original Message-----
From: Mark Zukiwsky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2000 9:58 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Using CFLOCK


Paul Smith wrote:

>How do you output its value?
>
>>session.sessionid is a value which is set by the CF server, not by the
user,


Session and application variables are stored as structures, so you 
can view them by looping through the structure. Just add this bit of 
code to a page and it will output your variables.

<h3>Application Variables</h3>
<cflock name="#application.applicationName#" timeout="30" Type = "ReadOnly">
   <cfloop collection="#application#" item="appVar">
     <cfoutput>
     key = #appVar# (Value = #application[appVar]#)<br>
     </cfoutput>
   </cfloop>
</cflock>
<p>
<h3>Session Variables</h3>
<cflock name="#session.SessionID#" timeout="30" Type = "ReadOnly">
   <cfloop collection="#session#" item="sessionVar">
     <cfoutput>
     key = #sessionVar# (Value = #session[sessionVar]#)<br>
     </cfoutput>
   </cfloop>
</cflock>

For more detailed information check out the book "Mastering 
ColdFusion 4" by Arman Danesh. It covers application and session 
variables, and the use of cflock in detail. In fact, that's were I 
scooped this code from. The book is worth it for the application 
framework and error handling chapters alone.

Mark Zukiwsky
Edmonton, Canada

----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to