Forum Moderators: open

Message Too Old, No Replies

&request("ID") problem with code

ASP page, using VBScript

         

Misery

1:17 pm on May 3, 2003 (gmt 0)



problem with the following query
query ="select from Employ where ID="&request("ID")""

This should return a record from the Employ table (recordset) to ASP page, but I'm get the error message
Error Type:

Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/jobdetails.asp, line 3, column 52
query="select * from employ where id="&request("ID")""

Employ is the table.
ID is a field in the table.
I am not familiar with the &request command. I wonder if the syntax is right here?

sullen

1:24 pm on May 3, 2003 (gmt 0)

10+ Year Member



The problem is your two "s at the end of the statement. There's no need for them to be there (or there should be another &)

so :
query ="select from Employ where ID="&request("ID")
Connection.execute (query)

RainMaker

6:30 pm on May 5, 2003 (gmt 0)

10+ Year Member



if query is a variable and the ampersand sign is a string separator then the part where you have ("ID") might be giving you problems with either compiler or DataBase. Try ('ID') and see if that works.