[thelist] ok, simple asp string compare problem.
Brian Delaney
brian.delaney at mccmh.net
Fri Oct 15 08:11:27 CDT 2004
If I run the first attempt it returns and error: type mismatch
not sure how your second option works? IF "" ??
Thanks
Joshua Olson wrote:
>>-----Original Message-----
>>From: Brian Delaney
>>Sent: Thursday, October 14, 2004 3:28 PM
>>
>>I am brain dead and probably just missing something:
>>
>>I have a user select from a drop down list:
>>
>><option value="1">IT Admin</option>
>>
>>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"
>>????
>>
>>
>
>You are most likely comparing numerics to strings, which will fail. Two
>things you can do:
>
>If objRS("adminperm") = CLng(Request.form("txtAPP")) Then
>
>Or
>
>If "" & objRS("adminperm") = Request.form("txtAPP") Then
>
>Your call.
>
><><><><><><><><><><>
>Joshua Olson
>Web Application Engineer
>WAE Tech Inc.
>http://www.waetech.com/service_areas/
>706.210.0168
>
>
>
>
*
*
*
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.
More information about the thelist
mailing list