|
-
October 4th, 2006, 05:54 AM
#1
simple as pie!
dont suppose any1 can tell me whats wrong with this syntax)
cSQL = "SELECT PERSNO FROM PERSON WHERE PERSNO LIKE" & Quote(Request("SOURCE"))%
thanks
-
October 4th, 2006, 06:48 AM
#2
Re: simple as pie!
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")))
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook
0100 1101 0110 1001 0110 0011 0110 1000 0110 0001 0110 0101 0110 1100 0010 0000 0100 0101 0110 1100 0110 1100 0110 0101 0111 0010
-
October 6th, 2006, 08:43 PM
#3
Re: simple as pie!
A space between the LIKE and the " will be needed (I think?).
Can't comment on the rest of the query though...
-
October 7th, 2006, 03:38 AM
#4
Re: simple as pie!
cSQL = "SELECT PERSNO FROM PERSON WHERE PERSNO LIKE '" & Quote(Request("SOURCE")) & "%'"
i think so Single quotes missing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|