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!

You missing opening curling bracklet in while loop

while(columns1.next())
{
     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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.