Should be equal, but not?

# Thread: Should be equal, but not?

1. Chris A. Guest

## Should be equal, but not?

Here&#039;s a snippet that is driving me up a wall today. It should work just fine, I thought:<BR><BR>&#060;%<BR><BR>teamid=request("tea mid")<BR><BR>if tRS("VisitorID") = (teamid) then %&#062;<BR>&nbsp; &#060;B&#062;&#060;%=tRS("Vteam")%&#062;&#060;/B&#062; (vs. &#060;%=tRS("SchoolName")%&#062;) -<BR>&#060;%=tRS("gamedate")%&#062;, &#060;%=tRS("gametime")%&#062;<BR>&#060;% else %&#062;<BR>&nbsp; &#060;B&#062;&#060;%=tRS("SchoolName")%&#062;&#060 ;/B&#062; (vs. &#060;%=tRS("Vteam")%&#062;) -<BR>&#060;%=tRS("gamedate")%&#062;, &#060;%=tRS("gametime")%&#062;<BR>&#060;% end if %&#062;<BR><BR>Anyway...when we define teamid with a number, lets say 86, it doesn&#039;t work. But when we do this:<BR><BR>teamid=request("teamid")<BR><BR>&#060 ;% if tRS("VisitorID") = 86 then %&#062;<BR>&nbsp; &#060;B&#062;&#060;%=tRS("Vteam")%&#062;&#060;/B&#062; (vs. &#060;%=tRS("SchoolName")%&#062;) -<BR>&#060;%=tRS("gamedate")%&#062;, &#060;%=tRS("gametime")%&#062;<BR>&#060;% else %&#062;<BR>&nbsp; &#060;B&#062;&#060;%=tRS("SchoolName")%&#062;&#060 ;/B&#062; (vs. &#060;%=tRS("Vteam")%&#062;) -<BR>&#060;%=tRS("gamedate")%&#062;, &#060;%=tRS("gametime")%&#062;<BR>&#060;% end if %&#062;<BR><BR>It works just fine. It&#039;s like 86 doesn&#039;t equal 86 in that first line.<BR><BR>Thoughts? How could that be? Please help!!!<BR><BR>C. A.

2. Senior Member
Join Date
Dec 1969
Posts
667

## cint()

&#060;% if tRS("VisitorID") = 86 then %&#062; <BR><BR>do this:<BR>CInt(tRS("VisitorID"))<BR><BR>Otherwise VBS thinks its a variant

3. Wild J Guest

## RE: Should be equal, but not?

Try this:<BR><BR>teamid=Cint(request("teamid"))<BR><BR >Convert it to an integer value.

4. Chris A. Guest

## RE: Should be equal, but not?

D&#039;oh! I should have seen that a mile away.<BR><BR>Duh.<BR><BR>Thanks guys!<BR><BR>C. A.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•