I've got this code which seems right but I keep getting: An error occurred at line: 19 in the jsp file: /viewFAQ.jsp
Syntax error, insert "AssignmentOperator Expression" to complete Assignment

where the lines involved are:

16: String key = request.getParameter("edit");
17:   ResultSet columns1 = statement.executeQuery("SELECT * FROM Questions WHERE ID ="+ key +"");
18:   while(columns1.next())
19:     String editID  = columns1.getString("ID");
20:     String edit_Question = columns1.getString("Question");
21:     String edit_Answer = columns1.getString("Answer");
22: 	String edit_Updated = columns1.getString("Timestamp");

I'm sure this is something easy to fix....thanks for your help!

10 Years
Discussion Span
Last Post by peter_budo

You missing opening curling bracklet in while loop

     String editID  = columns1.getString("ID");

Also you approach is consider it to be bad practice. You should follow MVC model. The MVC model separates the application data (contained in the model) from graphical presentation components(the view) and processing logic (the controller). You should have look on this tutorial

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.