Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QueryString question on a number field

Status
Not open for further replies.

ziggs

Technical User
Sep 21, 2000
195
US
Sorry, I'm new at this. I know how to put in a QueryString like:

SQL20 = "SELECT * FROM DB.PERSON"
SQL20 = SQL20 & WHERE TYPE = '" & Request.QueryString ("type") & "'"

This works fine. However, the following is based on what I believe is a number field as opposed to the above where the "type" is based on text. So, what am I doing wrong to the following (The chain is a number field I believe).

SQL20 = "SELECT * FROM DB.PERSON"
SQL20 = SQL20 & WHERE CHAIN = '" & Request.QueryString ("chain") & "'"
 
Take out the single quotes. Should be:
Code:
SQL20 = "SELECT * FROM DB.PERSON"
SQL20 = SQL20 & WHERE CHAIN = " & Request.QueryString ("chain")
Wushutwist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top