Try quotes around you dynamic session vars.
<cfset session["#dypart#"] ="avalue">

I think you should use structs in the session for clarity to a specific
application..
ie
<cflock type="exclusive" scope="session" timeout="10">
<cfscript>
session.appName= structNew();
session.appName.var1="This is var one";
OR
session.appName["var1"]="This is var one";
</cfscript>
</cflock>

Joe


----- Original Message -----
From: "Bruce, Rodney S HQISEC/SIGNAL" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 5:42 PM
Subject: dynamic session vars


> Ok
>
> Having a total brain freeze here.
>
> How do I set and access a dynamic session var.
>
> I know I am missing something simple here but I have tried and have not
> gotten to work:
>
> <CFSET  dypart ="myinfo">
>
> <CFSET  session.#dypart# = "avalue">
>
> <CFOUTPUT>
> #session.dypart#
> </CFOUTPUT>
>
>
> <CFSET session[#dypart#] ="avalue">
>
>
> <CFSET "session.#dypart#" ="avalue">
>
> <CFOUTPUT>
> #session[#dypart#]#
> #session.#dypart##
> </CFOUTPUT>
>
>
> Where am I missing it?
>
> Thanks for any help
> Rodney
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to