title: Updating Values Netbeans
body: <p>I am trying to Update my data from my netbeans to sqlite. there is no problem with the query but when I run the program a message box will appear "java.sql.SQLException:query does not return results". What seems to be the problem?   </p>
  
  <pre><code> try{
  
     String value1=txtId.getText();
     String value2=txtFirst.getText();
     String value3=txtLast.getText();
     String value4=txtUser.getText();
     String value5=txtPass.getText();
  
  
     String sql="Update account set id='"+value1+"', fname='"+value2+"', lname='"+value3+"',username='"+value4+"', password='"+value5+"' where id='"+value1+"' ";
  
     pst=conn.prepareStatement(sql);
  
     rs=pst.executeQuery();
     JOptionPane.showMessageDialog(null,"Data Updated");  
   }
  
    catch(SQLException e){
      JOptionPane.showMessageDialog(null,e);
  }
  </code></pre>