I'm trying to use the BETWEEN statement in .ASP page that is pulling information from two text boxes. I'm trying to find values between the same column. However, the server keeps giving me a 500 server error. What's wrong with the query statement ? I must be doing something wrong. Here's the code:
stockval = replace(trim(Request.Form("txtFrom")),"'","''")
stockval2 = replace(trim(Request.Form("txtTo")),"'","''")
strSQL = "SELECT * FROM FBase WHERE Rating BETWEEN & 'stockval='" & "stockval2='" & "'"