On Wed, 30 Oct 2002 13:26:32 -0000, Robertson-Ravo, Neil (REC) wrote:

> a few things :  why are you setting it to be FALSE the checking if its 0?
> pick a boolean method and stick to it :-)
>    
> You do not need to check the value of a boolean like this <cfif X = TRUE>
> but default, <cfif X> is the same and will always equate to True/False (I
> personally use 0s & 1s)

OK.

> Also, are you running MX? 

Nope.

if not, where are your <cflocks>?

Oh no...should I be putting <cflocks around *ALL* the <cfquery(s) I have in my app?
 
> Neil
> 
> 
> -----Original Message-----
> From: FlashGuy [mailto:flashmx@;rogers.com]
> Sent: 30 October 2002 13:23
> To: CF-Talk
> Subject: Run code once and only once at inital login...WTF!
> 
> 
> I have this line in my application.cfm file.
> 
> <cfparam name="session.InitialCodeRun" default="FALSE">
> 
> 
> Then in my index.cfm (which can get reloaded multiple times during a
> session) reads from a database and does some stuff based on the
> session.initialCodeRun.
> 
> Here is my code:
> 
> <cfif SESSION.InitialCodeRun IS 0>
>   <cfset SESSION.InitialCodeRun = 1>
>                          <cfquery name="GetEnv" datasource="profs"
> dbtype="ODBC">
>               SELECT      strField1
>                             FROM         table1
>    </cfquery>
> 
>   <cfif isDefined("GetEnv.strField1") IS "Yes">
>                           --- YES ---
>         <cfelse>
>                           --- NO ---
>         </cfif>
> </cfif>
> 
> Even though strField1 in my database has *nothing* entered there the above
> code returns "Yes" upon initial login. Even if I enter in "no" in that field
> it still returns "yes"
> 
> Whats going on?
> 
> 
> 
> ---------------------------------------------------
> Colonel Nathan R. Jessop
> Commanding Officer
> Marine Ground Forces
> Guatanamo Bay, Cuba
> ---------------------------------------------------
> 
> 
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to