View Single Post
  #1 (permalink)  
Old May 21st, 2004, 03:18 PM
cmiller cmiller is offline
Authorized User
 
Join Date: Jun 2003
Location: San Jose, CA, USA.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Request("var") issue

Hello,

My issue is that I am trying to pass a Query String to an ASP script that then searches for that variable in an SQL database. The script works fine until I subject it to my lack of ASP knowledge. Here's the details:


file call:
Code:
clientlist_alph.asp?alph=a
Script Line:
Code:
var oRs = theDatabase.execute("SELECT * FROM COMPANY WHERE
COMPANY_IMAGEFOLDER LIKE '"& Request("alph") &"%' ORDER BY
COMPANY_IMAGEFOLDER");
I get this error:
Code:
POST /control/clientlist_alph.asp |22|80040e14|[Microsoft]
ODBC_SQL_Server_Driver][SQL_Server]Line_1:_Incorrect_syntax_near_'0'.
500
However it works fine when I run it without that piece:
Code:
var oRs = theDatabase.execute("SELECT * FROM COMPANY ORDER BY 
COMPANY_IMAGEFOLDER");
Got any ideas what I'm doing wrong? Any help would be appreciated.

----------
~cmiller
__________________
----------
~cmiller
Reply With Quote