[thelist] ok, simple asp string compare problem.

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Thu Oct 14 15:38:18 CDT 2004


Hi Brian,

   Are there any spaces in either entry?  Any chance there's an invisible extra character?
http://aspalliance.com/peterbrunone/analyzethis/analyzethis.asp can tell you if you're not sure.

   Also, is there a chance you have character data that is incorrectly cased?

FWIW...

Peter

From: Brian Delaney brian.delaney at mccmh.net

I am brain dead and probably just missing something:

I have a user select from a drop down list:

IT Admin

Then I get the adminperm value from the sql db. In this case it is equal 
to 1
this is stored in the objRS.

What happens is even though this statement is true: *IF 
objRS("adminperm")= Request.Form("txtAPP") Then
* it always falls to the else "you donot have proper permission"
????

If objRS.EOF Then
strError = "- Invalid username or password
" & vbNewLine
Else
If objRS("password")= Request.Form("password") Then
* IF objRS("adminperm")= Request.Form("txtAPP") Then*
Session("loggedin") = True
Session("userid") = objRS("id")
Response.Redirect ("../itadmin.asp")
Response.End
Else
strError = "- You donot have proper 
permission -
" & vbNewLine
End IF
Else
strError = "- Invalid username or password
" & 
vbNewLine
End If
End IF

*
*
*
This message, including any attachments, is intended solely for the use of the named recipient(s) and may contain confidential and/or priveleged information. Any unauthorized review, use, disclosure or distribution of this communication(s) is expressly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy any and all copies of the original message.
-- 

* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


More information about the thelist mailing list