title: Multiple insert in a loop in jdbc
body: <pre><code>while (tokens.hasMoreTokens()) 
  {
      keyword = tokens.nextToken();
      System.out.println("File= "+fileid+" Keyword=" + keyword);
      stmt.executeUpdate(
          "INSERT into TEXTVALUEINVERTEDINDEX " + "(FILEID, KEYWORD) values ('"
          + fileid + "', '" + keyword + "')"
      );      
  }
  </code></pre>
  
  <p>This is the loop in which I'm updating the rows. The problem I'm facing is that when i run this only 1 value gets updated and when I comment the <code>stmt.executeUpdate()</code> line it displays all the possible entries in the database.</p>