Julie,

    My first suggestion would be to make sure that you're application.cfm
template has the <cfapplication> tag in it and that all of the attributes
are set properly (i.e. sessionmanagement="yes"
sessiontimeout=#CreateTimeSpan(days, hours, minutes, seconds)#).  I would
also try a few little debugging techniques like cfoutputing that session
variable in one file at a time to see where it loses it.  I generally put it
as the very first thing inside the body tag and outside any tables.  That
way,  when you run the page, you should see the value displayed somewhere at
the top of the page.  This will help you isolate the problem.  Hope this
helps, and welcome to cf.

Michael
----- Original Message -----
From: "Julie Clegg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2001 3:43 PM
Subject: session variables - newbie


>
>
> I am trying to add a field to my records to let me know who added/updated
> the record....I am new to Cf so I am having some trouble figuring out how
to
> go about doing this.....this app is running only on our network and users
> must go thru a login page to access the app.  My Login Action page creates
a
> session variable called session.userid as follows:
>
>            <cfif check_userid.recordcount>
> <cflock timeout="0" type="EXCLUSIVE">
> <cfset session.securityId = check_userid.croleid>
> <cfset session.authenticated = "true">
> <CFSET session.userId = check_userid.iEmpId>
> </cflock>
> <cflocation url="home.cfm">
> <cfabort>
>
>
> After I enter the app and go thru a few pages I want to write a new record
I
> created.  So I just went to the action page where the UPDATE SQL statement
> is and added the following:
>
>                 UPDATE CasacAppt
> SET dCasacDate  = '#form.dCasacDate#' ,
>     vCreateUser    = #session.userId# ,
> .........etc
>
>
>
> however when the record is added, the vCreateUser field is still <NULL>...
>
> what am I doing wrong??????????
>
> Thanks for your help!
>
> Julie
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to