You need to lock your session variables first off.

Try copying them into local variables before you use them in a query.

<cflock scope="SESSION" timeout="30" type="READONLY">
        <cfset Variables.userType = Session.UserType>
        <cfset Variables.EntityID = Session.EntityID>
</cflock>

______________________
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-----Original Message-----
From: Bruce Sorge [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 25, 2002 4:32 PM
To: CF-Talk
Subject: Worked for the last two weeks, suddenly stopped


I have a site that I have a couple of session variables set, and for the
la
st two or three weeks that I have been working on this all was working
well
 Now, for some reason the CFIF statements are not working.
What I am talking about is this:
<CFQUERY NAME="GetInsuranceCompanies" DATASOURCE="#DataSource#">
  SELECT *
  FROM Insurance
 <cfif Session.UserType IS "User">
  WHERE EntityID = #SESSION.EntityID#
  AND Active <> 0
 <cfelse>
  Where Active <> 0
 </cfif>
  ORDER BY InsuranceCompany
</CFQUERY>
I am outputting the UserType Session using the CFDUMP tag right in the
form
 that this and other queries are in, and I am showing my usertype as
User, 
however, the query is only using the Where Active <> 0 clause. I have
some 
other things that are supposed to happen based on the usertype, but none
of
 them are working. I am baffled. I have gone through my CF server admin
sec
tion, tried other machines thinking that mine was messed up or
something, c
opied the site to another web server to see if maybe the server was the
iss
ue, tried putting the session.usertype attribute in parens and using
single
 and double quotes but I am not getting anywhere. And like I said
before, e
verything was working great up till this afternoon. Nothing has changed
on 
the site or the server as far as I know.
Anyone encounter this in the past and if so, how did you overcome it?



______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
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