Vermontecher
Programmer
Hi All,
I am having a tough time with something that I figured (once again erroneously) would be quite simple. I want to compare two variables, one in a querystring and one in the database. I have the following which, when the page displays, shows me the two variables side by side. The problem is the if statement always returns false even when the values match exactly. Does anyone have a suggestion as to why it would not return true if the two numbers match exactly? I am trying to find the exact match between the querystring and the sort order for the record in the database. If they match I want one thing to happen if they don't I want something else to happen for all unmatched records.
<%
Dim SOrder, SKey
SOrder=rs("SortOrder")
Response.Write (Sorder)
SKey=Request.QueryString("current")
Response.Write (SKey)
If ("SOrder") = ("SKey") Then
Response.Write ("True")
Else
Response.Write ("False")
End If
%>
Thanks
JW
I am having a tough time with something that I figured (once again erroneously) would be quite simple. I want to compare two variables, one in a querystring and one in the database. I have the following which, when the page displays, shows me the two variables side by side. The problem is the if statement always returns false even when the values match exactly. Does anyone have a suggestion as to why it would not return true if the two numbers match exactly? I am trying to find the exact match between the querystring and the sort order for the record in the database. If they match I want one thing to happen if they don't I want something else to happen for all unmatched records.
<%
Dim SOrder, SKey
SOrder=rs("SortOrder")
Response.Write (Sorder)
SKey=Request.QueryString("current")
Response.Write (SKey)
If ("SOrder") = ("SKey") Then
Response.Write ("True")
Else
Response.Write ("False")
End If
%>
Thanks
JW