View Single Post
  #23 (permalink)  
Old July 3rd, 2008, 07:02 PM
Old Pedant Old Pedant is offline
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

The results from the new code I have inserted in as follows:

Session(AccessLevel) is ====
Is it numeric? True
As a string, length is 0
And its TypeName is Empty

*** BINGO!!! ***

Just exactly as Imar and I suspected.

is *EMPTY*. That means NO VALUE has EVER been assigned to

So the flaw is *NOT* on this page. It's on whatever page is SUPPOSED to put a value into

SORRY! We should have done this debug first thing.


Session(AccessLevel) is ====
  -- so notice there is *NOTHING* in between the first == and the second ==
Is it numeric? True
  -- this one is what was tripping us up!!!
  -- I didn't realize that an EMPTY value would show "True" as IsNumeric!!
As a string, length is 0
  -- But we already knew that from the ==== stuff.
And its TypeName is Empty
  -- Empty is *NOT* the same thing as a blank string.
  -- If your code had done
        Session("AccessLevel") = ""
  -- then TypeName would be STRING (just a zero length string)
  -- As I said, EMPTY means that NO VALUE was EVER stored in the session variable!

Okay? Time to go looking at the page where you *THOUGHT* you were setting the AccessLevel and, obviously, are not.