Hi all,
I have a page where a user fills in a form field.
When they hit submit the page is sent to a database
checker page where I want to retrieve all rows in the
table containing the string the user entered in the
form field. I'm not sure how to write this SELECT
statement.
I get this error when I hit the submit button:
"javax.servlet.ServletException: [Microsoft][ODBC
Microsoft Access 97 Driver] The SELECT statement
includes a reserved word or an argument name that is
misspelled or missing, or the punctuation is
incorrect"
Heres the part of my code:
Basically I want to retrieve all the rows containing
the string the user entered in the form field.
<%
if((request.getParameter("KenSearch")) != null)
{
String index = request.getParameter("KenwoodChoice");
PreparedStatement pstmt =
conn.prepareStatement("SELECT FROM PRODUCTS WHERE DESC
= (?)");
pstmt.clearParameters();
pstmt.setString(1, index);
ResultSet rs = pstmt.executeQuery();
}
Thanks
Rui
=====
"If a rabbit's foot is so lucky,..... what happened to the rabbit?"
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets