Hi Everyone,
I am stuck on this (what should be easy) task.
I am retrieving "MealCard" from a calling forms page. Then I want to match to check for duplicates by comparing what was entered on the form with what is in the data base.
The nearest I can tell is that the data types might be different because "MealCardData = MealCardvalue" never tests to be true.
Can anyone tell me what I am doing wrong?
Thanks in advance,
Al
I am stuck on this (what should be easy) task.
I am retrieving "MealCard" from a calling forms page. Then I want to match to check for duplicates by comparing what was entered on the form with what is in the data base.
The nearest I can tell is that the data types might be different because "MealCardData = MealCardvalue" never tests to be true.
Code:
Alreadyexists = FALSE
MealCardvalue = Request("MealCard")
LNamevalue = Request("LastName")
While Not RS.EOF
MealCardData = RS("MealCard")
If MealCardData = MealCardvalue Then
Alreadyexists = TRUE
Response.write "<p>Alreadyexists = " & Alreadyexists & "</p>"
Else
Response.write "<p>Alreadyexists Else = " & Alreadyexists & "</p>"
End If
Response.write "<p>MealCardData = " & MealCardData & "</p>"
Response.write "<p>MealCardvalue = " & MealCardvalue & "</p>"
RS.movenext
wend
Can anyone tell me what I am doing wrong?
Thanks in advance,
Al