title: Getting database values into a applet
body: <p>I have a access database with table named student And in that there's a <code>Id</code> field.I created a Java applet and in that when I input a value for Id in <code>TextField1</code> in the applet and press <code>Display</code> button,the applet should display the student's other details in TextFields.  </p>
  
  <p>Here's my code for the Display button.   </p>
  
  <pre><code>if(command=="Dispaly"){
      try{
      int stId=Integer.parseInt(textField1.getText());
          ResultSet result=state.executeQuery("SELECT*FROM student WHERE Id=stId");
  </code></pre>
  
  <p>But this gives an error as Too few parameters.Expected1.</p>
  
  <p>But if i change the query as </p>
  
  <pre><code>ResultSet result=state.executeQuery("SELECT*FROM student WHERE Id=3");
  </code></pre>
  
  <p>(That is for the student with id=3) it works fine.<br>
  What's wrong with my code? Can someone please show it to me?</p>