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