RE: Strange Boolean Error

2001-05-25 Thread David Shadovitz

Dunno why you can't replicate the error, since I don't know how UserID is 
generated.
But you should just check for (REQUEST.GetClientData.UserID GT 0) AND ...
-David

On Thursday, May 24, 2001 5:48 AM, Paul Smith [SMTP:[EMAIL PROTECTED]] 
wrote:
 UserID will always be provided, 0 if the user has not logged in, greater
 than 0 if they have logged in.

 The question is why I cannot replicate the failure from my workstation,
 Internet Exploder or NetScrape, but it always fails for my client?

 best, paul


 At 12:15 AM 5/24/01 -0700, you wrote:
 Sure.  O and 1 are boolean values, but 3 ain't.
 What is it you want to check?  Whether a UserID is provided?
 -David
 
 On Wednesday, May 23, 2001 11:56 PM, Paul Smith 
[SMTP:[EMAIL PROTECTED]]
 
 wrote:
   Is it expected behavior that the error below DOES NOT occur when
   REQUEST.GetClientData.UserID=1 but DOES occur when
   REQUEST.GetClientData.UserID=3 ? CFAS 4.5.1
  
   I cannot reproduce the error from my workstation.  UserID=3 at his
   workstation can repeat the error at will.
  
   Would it be better to use the YesNoFormat() function on the first 
boolean?
  
  
   best, paul
  
   An error occurred while evaluating the expression:
   REQUEST.GetClientData.UserID AND
   BitAnd(REQUEST.GetClientData.Permissions,VARIABLES.NeededPermission)
   Error near line 31, column 35.
   The short-circuit AND operator requires Boolean operands. Cannot convert
   the left operand to a Boolean value.

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Strange Boolean Error

2001-05-25 Thread Paul Smith

UserID is generated from my roll-your-own client database (I don't use 
CFAPPLICATION), which database has UserID = 0 as its default.  UserID in 
the client database is changed to the User's ID once they login.

My client reports that the following addition of the YesNoFormat() function 
eliminated the errors he was getting:

CFIF YesNoFormat(REQUEST.GetClientData.UserID) AND 
BitAnd(REQUEST.GetClientData.Permissions,VARIABLES.NeededPermssion)

It still seems strange to me that a ColdFusion error (a variable was not 
Boolean) should occur for one user but not another, where in both cases 
UserID was greater than 1.

best,  paul


At 05:02 PM 5/25/01 -0700, you wrote:
Dunno why you can't replicate the error, since I don't know how UserID is
generated.
But you should just check for (REQUEST.GetClientData.UserID GT 0) AND ...
-David

On Thursday, May 24, 2001 5:48 AM, Paul Smith [SMTP:[EMAIL PROTECTED]]
wrote:
  UserID will always be provided, 0 if the user has not logged in, greater
  than 0 if they have logged in.
 
  The question is why I cannot replicate the failure from my workstation,
  Internet Exploder or NetScrape, but it always fails for my client?
 
  best, paul
 
 
  At 12:15 AM 5/24/01 -0700, you wrote:
  Sure.  O and 1 are boolean values, but 3 ain't.
  What is it you want to check?  Whether a UserID is provided?
  -David
  
  On Wednesday, May 23, 2001 11:56 PM, Paul Smith
[SMTP:[EMAIL PROTECTED]]
  
  wrote:
Is it expected behavior that the error below DOES NOT occur when
REQUEST.GetClientData.UserID=1 but DOES occur when
REQUEST.GetClientData.UserID=3 ? CFAS 4.5.1
   
I cannot reproduce the error from my workstation.  UserID=3 at his
workstation can repeat the error at will.
   
Would it be better to use the YesNoFormat() function on the first
boolean?
   
   
best, paul
   
An error occurred while evaluating the expression:
REQUEST.GetClientData.UserID AND
BitAnd(REQUEST.GetClientData.Permissions,VARIABLES.NeededPermission)
Error near line 31, column 35.
The short-circuit AND operator requires Boolean operands. Cannot 
 convert
the left operand to a Boolean value.


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Strange Boolean Error

2001-05-24 Thread Paul Smith

Is it expected behavior that the error below DOES NOT occur when
REQUEST.GetClientData.UserID=1 but DOES occur when
REQUEST.GetClientData.UserID=3 ? CFAS 4.5.1

I cannot reproduce the error from my workstation.  UserID=3 at his 
workstation can repeat the error at will.

Would it be better to use the YesNoFormat() function on the first boolean?

best, paul

An error occurred while evaluating the expression:
REQUEST.GetClientData.UserID AND
BitAnd(REQUEST.GetClientData.Permissions,VARIABLES.NeededPermission)
Error near line 31, column 35.
The short-circuit AND operator requires Boolean operands. Cannot convert
the left operand to a Boolean value.


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Strange Boolean Error

2001-05-24 Thread David Shadovitz

Sure.  O and 1 are boolean values, but 3 ain't.
What is it you want to check?  Whether a UserID is provided?
-David

On Wednesday, May 23, 2001 11:56 PM, Paul Smith [SMTP:[EMAIL PROTECTED]] 
wrote:
 Is it expected behavior that the error below DOES NOT occur when
 REQUEST.GetClientData.UserID=1 but DOES occur when
 REQUEST.GetClientData.UserID=3 ? CFAS 4.5.1

 I cannot reproduce the error from my workstation.  UserID=3 at his
 workstation can repeat the error at will.

 Would it be better to use the YesNoFormat() function on the first boolean?

 best, paul

 An error occurred while evaluating the expression:
 REQUEST.GetClientData.UserID AND
 BitAnd(REQUEST.GetClientData.Permissions,VARIABLES.NeededPermission)
 Error near line 31, column 35.
 The short-circuit AND operator requires Boolean operands. Cannot convert
 the left operand to a Boolean value.

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Strange Boolean Error

2001-05-24 Thread Paul Smith

UserID will always be provided, 0 if the user has not logged in, greater 
than 0 if they have logged in.

The question is why I cannot replicate the failure from my workstation, 
Internet Exploder or NetScrape, but it always fails for my client?

best, paul


At 12:15 AM 5/24/01 -0700, you wrote:
Sure.  O and 1 are boolean values, but 3 ain't.
What is it you want to check?  Whether a UserID is provided?
-David

On Wednesday, May 23, 2001 11:56 PM, Paul Smith [SMTP:[EMAIL PROTECTED]]
wrote:
  Is it expected behavior that the error below DOES NOT occur when
  REQUEST.GetClientData.UserID=1 but DOES occur when
  REQUEST.GetClientData.UserID=3 ? CFAS 4.5.1
 
  I cannot reproduce the error from my workstation.  UserID=3 at his
  workstation can repeat the error at will.
 
  Would it be better to use the YesNoFormat() function on the first boolean?
 
  best, paul
 
  An error occurred while evaluating the expression:
  REQUEST.GetClientData.UserID AND
  BitAnd(REQUEST.GetClientData.Permissions,VARIABLES.NeededPermission)
  Error near line 31, column 35.
  The short-circuit AND operator requires Boolean operands. Cannot convert
  the left operand to a Boolean value.


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists