title: sql update statement not working from Java but working manually?
body: <p>EDIT: I had a letter off, it's working now.</p>
  
  <p>I have the following sql statement</p>
  
  <pre><code>UPDATE names set sent_count = sent_count + 1  where user_name = 'name' AND category = 'test' AND service = 'test'
  </code></pre>
  
  <p>this works by increasing the sent_count each time I run the sql from PGAdmin3, but I have the following method in a Java program using Postgresql JDBC, it's not throwing any exceptions but it's not increasing sent_count here is the method below</p>
  
  <pre><code>public void increaseUsernameResponseCount(String userName, String category, String service, String country) throws SQLException
  {
      Connection conn = null;
      PreparedStatement pst = null;
      // ResultSet rs = null;
  
      try
      {
          Class.forName("org.postgresql.Driver");
          conn = DriverManager.getConnection(url, props);
          pst = conn.prepareStatement("UPDATE names set sent_count = sent_count + 1  where user_name = ? AND category = ? AND service = ?");
          pst.setString(1, userName);
          pst.setString(2, category);
          pst.setString(3, service);
  
          int count = pst.executeUpdate();
          System.out.println(count);
  
      }
      catch (Exception e)
      {
          System.out.println(e);
      }
      finally
      {
          pst.close();
          conn.close();
      }
  }
  </code></pre>
  
  <p>the count counter prints 0 when this method is ran. Any idea why it does not work from the method but it works when I execute the sql query?</p>