Oh let me try to explain.
I have a table named Category in a Database with fields Cat1,Cat2,Cat3.
Lets say there is a record already in the database with Cat1=a, Cat2=b, Cat3=c.
And a user tries to submit a form with the exact same values, I wish to query the database and check the values in the fields entered.
I'm not too sure how to go about it.The following is codes that check ONE field only and I still cant get it to work.
rsSQL = "SELECT Category1 FROM Category WHERE Category1 = '" & cat1 & "'"
set rs=Server.CreateObject("ADODB.recordset")
rs.Open rsSQL, DB
Do While Not rs.EOF
if rs("Category1") = cat1 then
strExist = "yes"
strCat1 = rs("category1")
end if
rs.MoveNext
Loop
rs.close
set rs=nothing
If strExist = "yes" then
response.write ("Record Exists.<a href='javascript: history.back()'>Back</a>")
response.write(strCat1)
end if