problems with variables

Results 1 to 3 of 3

Thread: problems with variables

  1. #1
    viesturs Guest

    Default problems with variables

    I got two variables<BR>PID2 = RS("ID") (from sql table)<BR>PID1 = Request.QueryString("PID")(passed from another page)<BR><BR>if use <BR><BR>IF PID1&#060;&#062;PID2 Then<BR> Response.Write(PID1 & PID2)<BR>End IF<BR><BR>the results may be<BR><BR>113:124<BR>124:124 (here is the problem) even they appear to be equal "if" ignores that.<BR><BR>when i use <BR><BR>if PID1=PID2 then<BR> Response.Write(PID1 & PID2)<BR>End IF<BR><BR>then it returns nothing althoug as i said PID1 and PID2 are equal at some point<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: problems with variables

    Try converting them to integers using cint() before comparing them.<BR><BR>IF cint(PID1)&#060;&#062;cint(PID2) Then<BR><BR>Not guaranteed but eliminates one possibility.<BR><BR>James<BR>

  3. #3
    Viesturs Guest

    Default RE: problems with variables

    Much appresiation. It helped.

Posting Permissions

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