Active Server Pages Programming (ASP)/building a constant

Advertisement


Question
I 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?  

Answer
Hi,

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?  

Active Server Pages Programming (ASP)

All Answers


Answers by Expert:


Ask Experts

Volunteer


Ashley Brazier

Expertise

Main focus is ASP, SQL Server 2000 & 2005

Experience

Over 6 years experience.

Education/Credentials
BCs Honours Software Design and Networks

©2012 About.com, a part of The New York Times Company. All rights reserved.