Active Server Pages Programming (ASP)/building a constant
Expert: Ashley Brazier - 1/18/2010
QuestionI am building a page that takes an input from a form and queries a database from it. For the sake of time, i want to be able to use an asp page I already have in place, but just alter the constants that are set in this page.
My SQL statement is built from a series of constants, including dataWhere. This is set as:
Const datawhere = "Where responsibility = *"
I need * to equal Request.Form("responsibility") But I don't seem to be able to get it to work. Can you help?
AnswerHi,
Can you not try somthing like this, excuse me if this is abit sketchy I don't really use ASP now.
mysql = "";
if(request.form("responsibility") = "")
datawhere = "Where responsibility = *"
else
datawhere = request.form("responsibility")
end if
Does this help?