Problem with deleting record.
Hi guys I'm having trouble deleting a record from my database, I'm able to insert a record but can't delete any. This is my code for my delete button. Basically there supposed to put the number of the question into the text field and click the delete button then it takes the number the user has inputted and uses it in a query to delete it. I'm not 100% sure if this is how you do it so any help would be great.
String selquestion1 = selquesttxt.getText();
int selquestion = Integer.parseInt(selquestion1);
try
{
Connection con = DriverManager.getConnection(databaseURL, "user", "password");
Statement stmt = con.createStatement();
String sql = "DELETE * FROM APP.QUESTIONS WHERE QUESTIONS.QUESTIONNO = " + selquestion;
stmt.executeUpdate(sql);
JOptionPane.showMessageDialog(null, "Question number " + selquestion + "has been deleted from the database.");
}catch(SQLException e)
{
JOptionPane.showMessageDialog(null,e);
}
// DELETE QUESTION BUTTON
}