Yup (on CF5, good practice on CFMX but not required)
<cflock timeout="20" throwontimeout="No" type="READONLY" scope="SESSION">
<cfoutput>#session.fullname#</cfoutput>
</cflock>
Do this at the top of the page:
<cflock timeout="20" throwontimeout="No" type="READONLY" scope="SESSION">
<cfset variables.fullname = session.fullname>
</cflock>
Then you can play with it all page long without any locks
<cfoutput>#variables.fullname#</cfoutput>
But if you modify it at all throughout the page, you will want to do the
following at the bottom of the page:
<cflock timeout="20" throwontimeout="No" type="EXCLUSIVE" scope="SESSION">
<cfset session.fullname = variables.fullname>
</cflock>
Hope this helps!
Paul Giesenhagen
QuillDesign
----- Original Message -----
From: "Luis Lebron" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, October 04, 2002 1:16 PM
Subject: Variable locking
> I have a question on Session variables. If I have a statement like
>
> <cfoutput>#Session.Fullname#</cfoutput>
>
> do I need to use cflock tags with it?
>
>
>
> thanks,
>
>
> Luis
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com