dont suppose any1 can tell me whats wrong with this:(syntax)
cSQL = "SELECT PERSNO FROM PERSON WHERE PERSNO LIKE" & Quote(Request("SOURCE"))%
thanks
Printable View
dont suppose any1 can tell me whats wrong with this:(syntax)
cSQL = "SELECT PERSNO FROM PERSON WHERE PERSNO LIKE" & Quote(Request("SOURCE"))%
thanks
Have you tried this?
cSQL = "SELECT PERSNO FROM PERSON WHERE PERSNO LIKE" & Quote(Request("SOURCE")) & "%"
or
cSQL = "SELECT PERSNO FROM PERSON WHERE PERSNO LIKE @SOURCE"
and add a parameter into your command object i.e
dbComm.Parameters.Add(New SqlParameter("@SOURCE", Quote(Request("SOURCE")))
A space between the LIKE and the " will be needed (I think?).
Can't comment on the rest of the query though...
cSQL = "SELECT PERSNO FROM PERSON WHERE PERSNO LIKE '" & Quote(Request("SOURCE")) & "%'"
i think so Single quotes missing