PDA

View Full Version : Problem in ASP


Annette
07-06-2002, 11:00 AM
Can anyone tell me how to select from a table where the ID equals a passed parameter?

eg:
Query ="SELECT * FROM tblMusic WHERE tblMusic.fldID = <%=Request("MusicID")%>"

The query works if I put in the value
eg:
Query ="SELECT * FROM tblMusic WHERE tblMusic.fldID = 1

but I can't seem to work out the syntax for a variable or passed in parameter.

Thanks

Kings
07-06-2002, 03:58 PM
it'll work like this;

Query ="SELECT * FROM tblMusic WHERE tblMusic.fldID = " & Request("MusicID")

Annette
07-06-2002, 07:56 PM
Thank you