Hello to the JSP gurus out there.


I am having trouble with making a query to a database with a JSP variable.

I know the variable is ok because I can print it out but I can't seem to get
the select statement
to accept the variable. I am trying to call a particular author's record and
if I type in the number in the
select statement the statement works i.e.. WHERE authorid = 2   but when I
put the variable in there is always
an error. I have tried to use "" and '' . What else could I try. I am
grateful for any help on this.

<%
String queryStr = "SELECT authorid,firstname,lastname FROM author WHERE
authorid LIKE authoridnum ";
%>
Barb Johnson
Instructional Programmer

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to